Skip to main content

Full text of "CBM 8-Bit Magazine Index: Compute's Gazette Special Section"

See other formats


DO-IT-YOURSELF 


3 GREAT TOOLS LET YOU 
CREATE YOUR OWN APPS 


10 LOW-COST 
SOLUTIONS 

TO BIG BACKUP 
PROBLEMS 


6 SUPER TIPS 
HELP YOU 
GET ONLINE 
AND FLY! 


5 
93 


sense ont alan EON aE I! eee 


05 


(=) 
nO 


0 


& 
oo 
rox 


3 


64/128 VIEW 


Guess what, GEOS fans! 


You've got your 


own magazine—again! 


Tom Netsel 


omputer publications 
have a way of appear- 
ing and disappearing 
faster than a magician's 
rabbit. But when one pops 
up for 64 and 128 users, | 
have this reaction to wish it 
well—despite the fact that 
it's a potential competitor. Af- 
ter all, it's nice to see some- 
one else taking a serious in- 
terest in our machines. 

Rather than trying to cov- 
er the whole Commodore 8- 
bit spectrum, publisher and 
managing editor Grady 
Brown is focusing his atten- 
tion on GEOS with his new 
journal, geoVISION Interna- 
tional. The premier issue 
has just arrived, and it looks 
impressive—and the type- 
face is clear and legible. 
Too many GEOS publica- 
tions are tough to read. 

A bimonthly publication 
of 28-32 laser-printed pag- 
es, geoVISION International 
plans to print columns once 
found in other Commodore 
and GEOS magazines in ad- 
dition to new articles. Brown 
states in his editorial that the 
philosophy behind his new 
publication “is to bring all 
GEOS users and program- 
mers together, spreading 
the knowledge, experienc- 
es, and information of 
GEOS users worldwide, and 
to give you the best GEOS 
support possible.” 

That's quite a goal for any 
publication, but Brown of- 
fers a good selection of arti- 
cles and information. Arti- 
cles in the first issue include 
what's hot and what's not on 
the big telecommunication 
networks, a tutorial on ge- 
oPaint by Australian artist 
Jane Voskamp-Jones, a 
geoWrite tutorial, and a 
roundup of the four GEOS 
programming languages. 


There are reviews of sev- 
eral GEOS products, includ- 
ing geoCanvas, Perfect 
Print LQ, Dual Top, and Col- 
lete Utilities. (For more infor- 
mation about Collete Utili- 
ties, see Steve Vander Ark's 
“GEOS” column in this is- 
sue.) There's a list of bulletin 
boards, publications, and us- 
er groups that offer GEOS 
support. There are even sev- 
eral Australian newsletters 
and groups mentioned, 

In his editorial, Brown ad- 
dresses questions that are 
bound to be asked by peo- 
ple who have subscribed to 
magazines only to have 
them cease publication with- 
out honoring their obliga- 
tions. We cannot guarantee 
we'll be around forever. No 
one can. But we do promise 
to follow through with all our 
commitments to each and 
every subscriber.” 

In addition to the maga- 
zine, Brown offers six GEOS 
disks per year. They include 
programs and utilities cover- 
ing fonts, desk accessories, 
applications, drivers, geo- 
Calc and geoFile templates, 
and clip art. 

To give geoVISION Inter- 
national a try, U.S. subscrip- 
tion rates are $21 for six is- 
sues or $4 for a single is- 
sue, Washington residents 
must add local sales tax. Ca- 
nadian and Mexican sub- 
scriptions are $27 per year, 
$5 for a single issue. Interna- 
tional subscriptions (via air 
mail) are $33 per year, $6 
for a single issue. 

Disk subscriptions are 
$30 for six issues in the 
U.S., $39 in Canada and 
Mexico, and $45 elsewhere. 
Order by writing to geo- 
VISION International, 816 
Southeast Polk Street, Cam- 
as, Washington 98607. © 


GAZETTE 


64/128 VIEW G-1 
Announcing a new magazine for GEOS fans. 

By Tom Netsel. 

SCREEN GEMS G-2 


Try these nine programs on your 128 to see what 
BASIC 7.0 can do to brighten up a screen. 
By Henning Vahlenkamp. 


REVIEWS 6-8 
The Lost World and Video Digitizer. 

FEEDBACK G-12 
Questions, answers, and comments. 

BEGINNER BASIC G-16 
Readers reply with random-number generators. 

By Larry Cotton. 

MACHINE LANGUAGE G-18 


Create an array with BASIC, and then use machine 
language to modify it. 
By Jim Butterfield. 


PROGRAMMER’S PAGE 


The 64 has a number of interesting quirks. 
By Randy Thompson, 


GEOS 
Additional sources of great GEOS programs. 
By Steve Vander Ark. 


D’IVERSIONS G-24 


Imagine flipping through 1500 television channels. 
By Fred D'lgnazio. 


PROGRAMS 


G-20 


G-22 


Mailing List (64) G-28 
Utility Plus (64) G-31 
Director-Ease (64) G-33 
Cross Ref 128 G-35 
Your Own Database (64/128) G-36 
ML Macros (64) G-39 
The Automatic Proofreader (64/128) G-40 


MAY 1993 COMPUTE 


5 


REIS REIN cfg LTS SESS ECE 270 Le ESE Be SEAS 


G-1 


ne of the biggest 
advantages the 128 
has over its little 


brother, the 64, is its power- 
ful built-in BASIC 7.0 lan- 
guage. This language's rich 
array of 165 different com- 
mands (not counting OFF 
and QUIT which were 
planned but never imple- 
mented) allows you to do 
many things more easily 
than you can on the 64, not 


the least of which is graph- 
ics. Consequently, you can 
create interesting graphic 
displays on your 128 with a 
minimum of effort and with- 
out using complex machine 
language. ° 

That leads me to the 
subject of this article. Fol- 
lowing are nine concise pro- 
grams that show off some 
of BASIC 7.0’s graphical tal- 
ents. These hacks, or 
screen gems, do a variety 
of fascinating things on both 
40- and 80-column screens. 
| did my best to write them 
in clear, straightforward 
code so you can modify or 
incorporate them easily into 
your own programs. Exper- 
imenting with programs is 
one of the best ways to 
learn to harness BASIC 
7.0's power for yourself. 

Now on to the gems. 
Let's first look at some col- 


orful sparklers that work on 
40-column screens. 


Sprite Chaos 

Sprite Chaos is a short 
sprite demonstration pro- 
gram. First, all eight sprites, 
depicted as_ colored 


spheres, are set in motion 
at random angles and 
speeds. Here’s the twist. 
Once they’re moving, the 
process is repeated, but 
with new random angles 


CTCCT) 


TRY THESE NINE PROGRAMMING GEMS TO 


and different speeds. This 
occurs continuously, result- 
ing in sprites that fly around 
the screen in unpredictable 
and interesting ways. You 
might want to use the effect 
as an eye-catching back- 
drop for a title screen in 
your own programs. 


1 REM SPRITE CHAOS 
10 COLOR 0,1:COLOR 
4,1: COLOR 5,13: 

GRAPHIC O,1 


20 CHAR ,13,10,“SPRITE 
CHAOS!” 

30 FOR D=0 TO 63:READ 
V:POKE3584+D,V: 
NEXT 

40 FOR l=2 TO 8:SPRSAV 
1,:NEXT 

50 SPRCOLOR 16,16 

60 FOR S=1 TO 8:MOVSPR 
S,0,0:NEXT 

70 FOR S=1TO8:SPRITES, 
1,8+1,1,1,1,1:NEXT 

80 DO:FOR l=1 TO 8 

90 A=INT(RND(1)*360+.5) 


CINS 


EE JUST WHAT BASIC 7.0 CAN DO IN A 128. 


100 S=INT(RND(1)*15+1) 
:IF S<5 THEN 100 

110 MOVSPR 1,A #8 

120 NEXT:LOOP 

130 DATA 0,170,0,2,90, 
128, 9,106 

140 DATA 160,9,170,160, 
37,170,168,38 

150 DATA 170,168,38,170, 
168,150,17 0,170 

160 DATA 154,170,170, 
170,170,170,170,170 

170 DATA170,170,170,170, 
170,170,170,170 

180 DATA 170,170,42,170, 
168,42,170,168 

190 DATA 42,170,168, 10, 
170,160,10,170 

200 DATA 160,2,170,128,0, 

170,0,0 


Curve Explosion 

Picture an infinite number of 
different parabolic curves 
streaming out like a fountain 
from a central point on the 
screen. That’s what Curve 


Explosion does with its 
short plotting routine. The 
program works like a circle 
algorithm, but it draws only 
half a circle. Each curve has 
a common starting point. 
Run this one on your 128 to 
see the intriguing display. 


1 REM CURVE EXPLSION 

10 COLOR 1,2:COLOR 
0,1:COLOR1,4 

20 GRAPHIC 1,1 

30 DRAW ,0,199 TO 319, 
199 

40 DO:A=INT(RND(1) 
*70+10) 

50 B=INT(RND(1)*150+10) 

60 C=INT(RND(1)*2+1) 

70 IF C=1 THEN BEGIN 

80 D=3.14:E=-.1:F=-.2: 
G=A:BEND:ELSE 
BEGIN 

90 D=0:E=3.3:F=.2:G=- 
A:BEND 

100 LOCATE 160,199 

110 FOR R=D TO E STEP F 


WRITTEN BY 
HENNING 
VAHLENKAMP 


120 X=INT(A*COS(R)): 
Y=INT(B*SIN(R)) 
130 DRAW TO 160+G+X, 

199-Y 
140 NEXT R:LOOP 


String Bounce 

Are you looking for a new 
way to display a message 
on your 128? If.so, try 
String Bounce. Just put any 
message into A$, and this 
program will move it around 


the screen. If the message hits a bor- 
der, it bounces off and continues in 
the opposite direction. Your message 
will leave a trail as it moves if you 
change the color in line 90. Change 
the 39 in lines 30 and 120 to 79 to 
make the program work on the 80-col- 
umn screen. Keep the message rea- 
sonably short, or it will move down 
excessively. 


1 REM STRING BOUNCE 

10 SCNCLR:A$="COMMODORE!" 

20 COLOR 5,2:COLOR 0,1:COLOR 

41 

30 X=INT(RND(1)*39-LEN(A$)+.5) 

40 IF X<0 THEN 30 

50 Y=INT(RND(1)*23+1) 

60 CHAR ,X,Y,A$:DX=1:DY=1 

70 V=INT(RND(1)*3-1) 

80 IF V=0 THEN 70 

90 DO:XO=X:YO=Y:COLOR 5,1 

100 CHAR ,XO,YO,A$:X=X+V* 
DX:Y=Y+V*DY 

110 IF X<1 THEN DX=-DX:X=XO 

120 IF X>39-LEN(A$) THEN DX=- 
DX:X=XO 

130 IF Y<1 THEN DY=-DY:Y=YO 

140 IF Y>23 THEN DY=-DY:Y=YO 

150 COLOR 5,2:CHAR ,X,Y,AS 

160 LOOP 


Star Shapes 

Star Shapes puts simple trigonome- 
try to use so you can create an infi- 
nite variety of star-like designs. 
When you run the program, it asks 
you for an x and y radius. These are 
the radii of two circles. Lines are 
drawn from each of ten points 
arranged in a circle to each of ten 
points around your circle. The results 
produce elaborate symmetrical star 
shapes. Run it to see what | mean. 
These programs have few frills, so 
you'll have to hit Run/Stop-Restore 
and type RUN again to get this one 
to repeat 


1 REM STAR SHAPES 

10 COLOR 1,2:COLOR 0,1:COLOR 
41 

20 INPUT“[SHFT CLR][CRSR DN] 
ENTER X RADIUS: ";X1 

30 INPUT“ENTER Y RADIUS: ";¥1 

40 FOR D=1 TO 10:READ A(D),B(D) 
‘NEXT 

50 GRAPHIC 1,1 

60 FOR L=1 TO 10 

70 FOR R=0 TO 6.28 STEP .628 

80 LOCATE A(L),B(L) 

90 X=INT(X1*COS(R)):Y=INT (¥1* SIN 
(R)) 

100 DRAW TO X+160,Y+100 

110 NEXT R,L 

120 DATA 249, 100,232, 147,187,176 

130 DATA 132,176,87,146,70,99 

140 DATA 87,52, 132,23, 188,24,233,53 


G-4 COMPUTE MAY 1993 


Brownian Symmetry 

This little hack differs from typical 
kaleidoscope-type programs by simu- 
lating Brownian motion, the random 
movement of microscopic particles in 
a fluid. | won't attempt an explanation 
of this phenomenon here, but it can 
produce eye-catching designs. 

The program works by displaying a 
pixel influenced by Brownian motion 
and copying it across four lines of sym- 
metry, resulting in eight reflections. You 
can choose hi-res or multicolor mode 
for the display as well as whether to 
erase the points after they're plotted. | 
think you'll find that Brownian Symme- 
try shows that there can be beauty in 
scientific phenomena. 


1 REM BROWNIAN SYMMETRY 

10 V=1:COLOR 0,1:COLOR 4,1 

20 INPUT“[SHFT CLR][CRSR DN](H)I- 
RES OR (M)ULTI ";GRS 

30 IF GR$="H" THEN SC=1:ELSE SC 
=3:V=2 

40 INPUT“[CRSR DNJERASE POINTS 
(Y/N)";ERS 

50 X=0:Y=0:P=2:GRAPHIC SC,1 

60 IF SC=3 THEN P=INT(RND(1)* 15 
+2) 

70 COLOR 1,P 

80 D=INT(RND(1)*15+1) 

90 MX=INT(RND(1)*(D*2+.5)-D) 

100 MY=INT(RND(1)*(D"2+.5)-D) 

110 X=X+MX:Y=Y+MY 

120 IF X<-100 THEN 80 

130 IF Y<-100 THEN 80 

140 IF X> 100 THEN 80 

150 IF Y< 100 THEN 80 

160 FOR L=1 TO 2 

170 DRAW ,(160-X)/V,100+Y 


180 DRAW ,(160-Y)/V,100+X 
190 DRAW ,(160-X)/V,100-Y 
200 DRAW ,(160-Y)/V, 100-X 
210 DRAW ,(160+X)/V,100+Y 


220 DRAW ,(160+Y)/V,100+X 
230 DRAW ,(160+Y)/V,100-Y 
240 DRAW ,(160+Y)/V,100-X 
230 IF ER$="N” THEN 60 


240 COLOR 1,1: NEXT L: GOTO 60 


Star Bursts 
Your monitor screen goes black and 
then slowly fills with an infinite variety 
of distinct, colorful explosions or star 
bursts. That’s what the following pro- 
gram will do on your 128. Each star 
burst consists of 25 randomly select- 
ed and colored rays emanating from a 
central point. Try it; | think you'll find 
this one is a real eye-catcher! 


1 REM STAR BURSTS 

10 COLOR 0,1:COLOR 4,1 

20 GRAPHIC 3,1:DO 

30 X1=INT(RND(1)*159) 

40 Y1=INT(RND(1)*199) 

50 FOR RP=1 TO 25 

60 CS=INT(RND(1)*3+1) 

70 CO=INT(RND(1)*7+2) 

80 X2=INT(RND(1)*24-11.5) 

90 Y2=INT(RND(1)*40-19.5) 

100 COLOR CS,CO 

110 DRAW CS,X1,Y1 TO 
ABS(X1+X2), ABS(Y1+Y2) 

120 NEXT:LOOP 


Trig Show 

Beginning math students often have 
trouble remembering the six basic 
trigonometric curves: sine, cosine, 
tangent, cosecant, secant, and cotan- 
gent. Trig Show helps by drawing 
each curve one at a time from -2 times 
pi to 2 times pi along the x-axis. It also 
shows each curve’s relationship to 
another curve since all of them appear 
and overlap on the same screen. 
When one curve finishes its plot, press 
Return to see the next one. Try this 
useful visual aid to increase your 
understanding of these trigonometric 
fundamentals. When typing this one 
in, remember that to enter pi in line 
250, hold down the Shift key while 
simultaneously pressing the up-arrow 
(#) key. 


1 REM TRIG SHOW 

10 COLOR 0,1:COLOR 4,1:COLOR 
1,2 

20 GRAPHIC 1,1 

30 CHAR ,0,19,“TRIG” 

40 CHAR ,0,20,“SHOW” 

50 DRAW ,0,100 TO 319,100 

60 DRAW ,159,0 TO 159,199 

70 FOR X=0 TO 319 STEP 39.75 

80 DRAW ,X,95 TO X, 105:NEXT 

90 DRAW , 155,70 TO 165,70 


* Extensive Catalog. 


Thousands of Commodore Owners Choose Us 
As Their One Stop Supplier . Here's Why! 


Great Selection of Front Line Software. 
We stock most major Commodore titles that are still in 
Production. 


Hardware & Peripherals. 
Although we can't get keyboards and disk drives any longer, 
we can offer disks, modems, cables, interfaces, and much 
more. 


Closeouts & Bargains, 
We're constantly seeking out those hard to get gems, and 
offering them at prices that would make Scrooge grin. 

Used Software Trade In Program. 


A Software Support exclusive. It takes a bit of extra work, but 
we don't mind. Another commitment to personalized service. 


Un-Advertised Specials. 
Our regular customers enjoy VIP service and great bargains 
that are hard to pass up. 


Expert Technical Support. 
As a regular Software Support customer, you have access to 
the most knowledgeable Commodore technical departments 
in the country. Of this, we're darn proud. 


Friendly & Courteous Order Takers. 
You'll have a hard time finding order takers as anxious to help 
you as Sandy, Ann and Connie. 


Fast Order Processing. 

inks to our automated computer system, huge inventory 
and effecient shipping staff, most orders are processed the 
same day. 


Walk In Sales Department. 
We welcome visitors to our warehouse outlet. The same great 
deals are available and best of all, no shipping charges. 


Worldwide Distributor Of Major Products. 

Ever hear of Maverick, Super Snapshot, Super 1750 Clone, 
and the 1581 Toolkit? We've been actively involved in the 
ground up production and world-wide distribution of these 
and many other fine Commodore products. 


* Purchase From Us With Confidence. 


We were very pleased when the 
Better Business Bureau came to us 
and told us that our outstanding | ¢ 
reputation qualifiedus as members | 
in their organization. We're here to | (yj 
stay, not a fly by night, here today /¥* 
and gone tomorrow outfit. | 


Our contacts at other mail order 
companies have told us that pro- 
ducing a catalog such as ours is too 


SOFTWARE SUPPORT 


INTERNATIONAL 
C-64/128 Specialists For Over Six Years 


hes Out These Examples... 


Items Listed Above Do Not Include Shipping. Call Or Write For Your Free 
Catalog Listing Hundreds Of Products And Special Offe: 
Computer, Our Order Takers Are On Duty 6:00 a.m. - 5:00 p.m. 
M- F and 7:00 a.m. - 3:00 p.m. Sat. - Pacific Time. 


GAMES 
Tony LaRussa Baseball 
Bard's Tale 3 
Airborne Ranger 
Land, Sea, & Air 
Test Drive 2... 
California Challenge 
European Challenge 

Muscle Cars .........++ 
Super Cars ...... 
Jack Nicklaus Golf 
J.N. Courses 2, 3 or 4 
TV Sports Football... 
Batman(Arcade Ver) 
Dragons of Flame ..... 
Marvel Comics Trilogy 
Operation Wolf..... 
Shoot'Em Up Cons! 


EDUCATIONAL 
Golan Clrerestecuenesarernitns i 
Keyboard Cadet. 5 
Carmen Time 
Ideas for C-64 Book 
Tri Math 
Donald's Alphabet 
Sky Travel 
Perfect Score SAT . 
Songwriter 


PRODUCTIVITY 
Super 1750 Clone.. 
Dome Accounting 
Big Blue Reader 64/12 
Maverick 64.0... 
Graphic Label Wizard 
Home Designer 128 
Sylvia Porter 128... 
Mastertype/ Writer 
Printshop ..... 
Word Writer 6. 


Paperclip Publisher .............. $29.97 


For Your 


time consuming and worst of all - | 
too expensive. We say it's the least } 
we can do for our customers, and 
wouldn't have it any other way. 
Simply call or write for your free 
copy. 


Circle Reader Service Number 190 


Ke WN 


tee SE 


aes 


stopaat 


Software Support Int. 
2700 N.E. Andresen Rd. 
Suite A-10 

Vancouver, Wa 98661 
(206) 695-1393 


CALL TOLL FREE TODAY! 1-800-356-1179 


Major Credit Cards Accepted. 


100 DRAW ,155,130 TO 165,130 
110 CHAR ,39,12,"X":CHAR ,19,0,"Y” 
420 BB=0:DEF FNY(X)=SIN(X) 
130 CHAR ,7,10,"SIN":GOSUB250 
140 BB=0:DEF FNY(X)=COS(X) 
150 CHAR ,15,10,"COS":GOSUB250 
160 BB=1:DEF FNY(X)=TAN(X) 
170 CHAR ,12,2,"TAN":GOSUB250 
180 BB=1:DEF FNY(X)=1/SIN(X) 
490 CHAR ,30,22,"CSC”:GOSUB250 
200 BB=1:DEF FNY(X)=1/COS(X) 
210 CHAR ,12,22,"SEC":GOSUB250 
220 BB=1:DEF FNY(X)=1/TAN(X) 
230 CHAR ,30,2,*COT":GOSUB250 
240 END 
250 FOR X=.05 TO 4*(n) STEP .05 
260 IF BB=1 THEN IF FNY(X)*30>=- 
4100 AND FNY(X)*30<=100 THEN 
DRAW ,X*25.5,100-FNY(X)"30 
270 IF BB=0: THEN DRAW ,X*25.5, 
4100- FNY(X)*30 280 NEXT: WAIT 
212,1:RETURN 


Now let's shift our attention to some 
80-column gems. 


Close and Open 

Over the years, many routines have 
been written to clear the 40-column 
ext screen in different ways. The 
ollowing short routine demonstrates 
an interesting screen clear for the 
128's often neglected 80-column text 


screen. First, text is displayed, and 
the program waits for a keypress. 
Then the left and right sides of the 
screen come together, squeezing out 
the text. The screen is cleared, new 
text is printed, and the screen 
expands again to reveal it. Try this 
one in your own programs instead of a 
boring SCNCLR command. 


1 REM CLOSE & OPEN 

10 SCNCLR:PRINTCHR$(27)CHR$ 
(82) 

20 CHAR ,26,10,“HERE IS THE 
[CTRL 9] F! RS T[CTRL 0] 
SCREEN" 

30 GETKEY K$:IF K$="" THEN 30 

40 R=86:L=6:DO 

50 SYS 52684,R,35:SYS 52684,L,34 

60 R=R-1:L=L+1 

70 LOOP UNTIL R<L:SCNCLR:SLEEP1 

80 CHAR ,25,10,“HERE IS THE [CTRL 
9] SEC ON D[CTRL 0] SCREEN" 

90 DO:R=R+1:L=L-1 

100 SYS 52684,R,35:SYS 52684,L,34 

110 LOOP UNTIL L<6 


Shaker 

Shaker does for the 128’s 80-column 
screen what many routines have done 
for the 40-column screen: It shakes it 
back and forth. This hack takes 
advantage of the VDC chip's little- 


known smooth-scrolling feature. By 
repeatedly moving the screen eight 
pixels to the left then eight to the right 
in increments of one, it produces this 
smooth effect. Try it and liven up dull 
text displays. 


1 REM SHAKER 

10 GRAPHIC 5,1:COLOR 5,5 

20 FOR |=15 TO 64:CHAR ,I,6,"*": 
CHAR, 1,16, "*":NEXT 

30 CHAR ,36,8,"“SHAKER" 

40 CHAR ,31,10,“COMPUTE'S 
GAZETTE” 

50 CHAR ,30,12,"324 WEST WEN 
DOVER AVENUE" 

60 CHAR ,29,14,"GREENSBORO, NC 
27408" 

70 FOR L=7 TO 0 STEP -1 

80 SYS 52698,,25:RREG AC 

90 SYS 52684,(AC AND 248)+L,25 

100 NEXT L 

110 FOR R=0 TO 7 

120 SYS 52698, ,25:RREG AC 

130 SYS 52684,(AC AND 248)+R,25 

140 NEXT R:GOTO 70 


| hope you take a few minutes to 
type in these little gems and see what 
a 128 can do. Feel free to modify and 
embellish these programs and use 
them as a basis for your own pro- 
gramming ideas. Q 


G-6 COMPUTE MAY 1993 


Commodore 


AMIGA 


Software Hut 


Folcroft East Business Park 313 Henderson Dr Sharon Hill, PA 19079 
Hours: Mon-Fri 9 to 6 


215-586-5701 Ordars 800-932-6442 Sat9 to 5 Eastern 


215-586-5706 
We do not publish a catalog. ¢ One of the East Coast’s largest Authorized Commodore dealers 
F you “e what it ¢ Full line of Hardware, Software, & Peripherals... IN STOCK 


Flease Call if you don't see what you want. 
1802 MONITORS Software Hut Delivers a 


Info 
FAX 


Games & Closeouts 


Bridge 5.0 $22.00 
Champions of Krynn 16.00 . 
Curse of the Azure Bonds 14.00 These BRAND NEW composite Commodore EXCLUSIVE! 
Death Kniohisotifoynn ih0 Monitors are Boxed with Ct 
Donald's Alphabet Chase 1200 | COmplete Cabling & Warranted | A BRAND NEW production run of 1581s, by Commodore, has been 
Duck Tales 22.00 | by Commodore for 1 year. made available to Software Hut EXCLUSIVELY! These drives come 
Gateway to the Savage Frontier 14.00 it re’s full 90 Da 
Gettysburg, The Turning Point 42.00 $145.00 Ve earned are complete 
Goofy's Railway Express 13.00 4 eye 
Linkword (Specify) 20.00% earn Hardware eae with all Cabling & Software. Call for 
Mickey's Runaway Zoo 13.00, 2 Che pinGompaste vane : special quantity pricing for Dealers 
Microleague Baseball 2 28.00 1541-2 Disk Drive NEW A 164.95 oe U q G ty p 9 
i 128 to Magnavox/1084 (Specify) 14.95 and Users Groups. 
Microleague Football 29.00 + é 
Neuromancer 17.00 Compu Di Drive Cable - 6 ft. vine 
is! lotcher B . 
He) ae go Ergo Joystick 18.00 We offer these drives at a 
Pool of Radiance 14.00 § Wiz Printer Interface 40.00 SUPER NEW Pri of 
Scrabble or Monopoly or Risk 17.00 fonltoiet Rng Pak A Low Price 
tO a $109.95 
ie Auaue vo SpeedKing Joystick 15.00 Brand New 3.5" 1581 Floppy Drive 
Star Control 29.00 Super Snapshot ver 5 56.00 5 : Fi 
Sticky Bear (Specify) 18,00 Super Graphix Jr 36.95 1571 Drives have just arrived. These 
Strip Poker 22.00 Suge Protector ares a a totally NEW units come with all cabling, 
Teenage Turtles Arcade 29.00 We carry a complete line of printer ribbons f 
Test Drive 2 - The Duel 28.00 for Commodore 801, 802, 803, 1525, 1526 a comprehensive manual, and a full 90 
Tetris 13.00 and for Panasonic 9 and 24 pin printers. Day Warranty. Perfect for your 128 or 
Tony LaRussa Baseball 12.00 $7.00 128D computer. Last year’s batch 
Typhoon of Steel 19.00 | d only 2 5 ks! Ord | 
Ultima 6 48.00 Productivity aste on y 2 weeks! Order early as 
Weird Dreams 11.00 1541/1571 Drive Align by Free Spirit $29.00 these will not last long at 
Where (Specify) is Carmen. Diego 27.00 1541/1571 Physical Exam by Cardinal 29.00 
Win, Lose or Draw 10.00 1581 ToolKit 22.00 $ 1 69. 95 
Xenophobe 10.00 Algeblaster 22,00 
ne a 
428D REFURBS Ona Maan 268) 1600 1 RAM EXP CHIPS CHIPS CHIPS 
ome Home Accounting | 
Just in! These 128Ds have | Elementary Grade Builder 22.00 Penta Gene a Wy IC 6526A $9.00 
been completely refurbished Fan tee 2x a $709.95 Hs S67 A COLIC VIC pan 
by Gommoder e,andcome | Geos (64) 39.00 ————— IC 7700-00 PLA 82S100 44.00 
with a full 90 Day Warranty. GEOS 128 V2_ 45.00 Chip Level Design Unit IC 8701 Clock Gen 5.00 
$274 95 GEOS International Fonts 25.00 $115.00 IC 8701 FG 5.00 
. Salih Grade Builder az IC LSI 8564 VIC Rev SCA 22.00 
u d IC PLA 8721 R3 14.00 
Math Blaster or Spell 72.00 PARTS IC ROM 2332 Character 9,00 
ee Ha Many cf ihe GGwind COR Tar IC ROM 2364 Basic or Kernel 9.00 
a t ‘ any of the following TC ek ee 
Refurbished $79.00 Pocket Writer 3 48.00 in SHORT SUPPLY. 
. Pocket Writer Dictionary 17.00 are In 
Cabling & Power Supply | pout rirz 22.00 Exon as note al i) NEW OUR POLICIES 
. Pocket Planner 2 22.00 W ay Warranty. ‘No walting ft de! hi 
Individually tested by CBM, Edatshon é 30.00 * 1541/1541C Internal Drive - $85.00 in by 2PM aah but the aenaaa Second 
each drive is of consistent | _ "it Shop Companion ne + 1571 Interanal Drive - $85.00 Tee ee eT 
high quality! SwiftCale (64) 400 | 64 P. Supply - $79. Parcel Post or DHL. Domestic orders are 
iliti E i i * C128 Keyboard - 36.00 shipped UPS. 
Super 81 Utilities 64-128 (Specify) 14.00 C1280 Keyboard - $22 * All orders are subject to credit card 
MINDSCAPE WordWriter 6 29.95 sctzep nee. Supply - $38 pa neicaion aN 
.P, . + All prices subjec . 
POWERPLAYERS + C128 Ext. P. Supply Refurb - $34. 
i UPGRADING? +P.S. for 1541-2 1571-2 1581- $26. — age 
? SE ; VISA ial 
JOY STICK amma —= 
* Microswitches AMIGA & MODEMS bse, We aca Maer a ard cor 
i j iD, iting Cash, Certit é 
jSteclishetS As the LARGEST Amiga Dealer in 1351 Mouse NEW $32.00 or Moaey Ordet. Goliwarolantiaccassovles 
. all-bearing pivot the United States, we carry a CBM 1670 - 1200 Baud $29.00 shipping is $4.00. Hardware shipping is $6.00 for 
* Pistol grip complete line of software, Aprotek 2400 w/software $89.95 small items, Call for larger items (ie. Monitors). 
eL ip COD add $5.00. Minimum COD order is $40.00. 
arge trigger hardware, and Amiga computers, Supra 2400 - $79.00 Canadian, APO, & International orders are 
N * Originally $34.95 including the AOD, A1200, Peak Modem Interface for charges & Incurance at ne of oder 1S se 
One for $8.95 - Two for $8.50 each) A2000, A3000, & A4000. non-CBM units - $29.00 stocking fee on all returns not exchanged. 


© Copyright 1993, techWriters Inc. All Rights Reserved 


REVIEWS 


THE LOST WORLD 


Does this sound familiar? 
You're tired of shoot-'em-up 
computer games that do 
nothing for a child’s mind, 
but your child shuns educa- 
tional games in favor of ac- 
tion and adventure. If that's 
the case, then Free Spirit 
Software has the answer for 
both of you in an adventure 
program it has just imported 
from the land down under. 
Based on a Sir Arthur Con- 
an Doyle novel published at 
the turn of the century, The 
Lost World is an offering 
from Satchel Software, a 
company that promotes the 
use of computers and com- 
puter text games in the 
school systems throughout 
South Australia. This partic- 
ular program, geared to- 
ward junior high students, 
ties in nicely with the study 
of fossils, dinosaurs, and nat- 
ural history. The game also 
helps students by encourag- 
ing reading, increasing vo- 
cabulary, widening thought 
processes, developing con- 
centration, and developing 
problem-solving strategies. 
With these goals in mind, 
you would probably expect 
The Lost World to be bor- 
ing. It's not! The game is 
great fun! It combines text 
commands with colorful 
graphics in a rollicking ad- 
venture that can be played 
alone or solved as part of a 
group effort. You'll find your- 
self facing quite an array of 
obstacles and many unique 
elements. In fact, if you 
don't use your head, you 
might end up as a tasty tid- 
bit for a hungry dinosaur. 
The game's text com- 
mands are relatively simple. 
Directions (north, west, up, 
down, and so on) can be ab- 
breviated by typing the first 
letter of the word. Young- 
sters who aren't familiar 
with a keyboard won't be 


G-8 COMPUTE MAY 1993 


put off by having to type in 
a lot of text. Action com- 
mands are kept simple, too, 
using verbs such as take, 
cut, drop, make, and so on. 
This lets children with vary- 
ing reading levels play and 
enjoy the game. You can al- 
so save your adventure—a 
nice feature if you’ve just 


want to do some reports for 
extra credit, too. 

The Lost World is far 
more than a text game and 
activity book. In fact, this 
three-disk package outdis- 
tances any game program 
I've ever seen, Satchel actu- 
ally gives you an incredible 
resource disk in this pro- 


Players will have fun finding treasure, discovering fossils, and 
meeting dinosaurs in The Lost World, but they'll also be learning. 


had an unfortunate encoun- 
ter with an Allosaur. 

Satchel wants its software 
to be challenging but not 
frustrating. The program- 
mers have found that a little 
help goes a long way, so 
they've included a 176- 
page manual that is divided 
into two parts. The first 67 
pages are for the teacher, 
and they offer suggestions 
and possible solutions for 
the game. This section 
should be used sparingly. 
Children in the appropriate 
age range should be able to 
solve the game with just a 
few hints to steer them in 
the right direction. The re- 
maining 109 pages of the 
manual are a bonus. They 
are crammed with games, 
crossword puzzles, and 
short articles that will pique 
a child's curiosity and offer 
hours of related activities. 
There's lots of good informa- 
tion here for students who 


gram that includes a basic 
database, a simple-to-use 
word processor called Easy 
Word, and several disk utili- 
ties—all designed for junior 
high students. 

The database is already 
set up with five files that per- 
tain to dinosaurs, explorers, 
and imaginary lands. Users 
can choose to view, edit, 
search, or sort the files. 
They can also add, delete, 
and print records. While the 
users can't create their own 
files, this program helps famil- 
iarize them with ways to 
work within databases and 
access information. 

The people at Satchel Soft- 
ware realize that novices of- 
ten inadvertently erase por- 
tions of their projects while 
learning to use a new pro- 
gram. To reduce this frustrat- 
ing possibility, some com- 
mands, such as DELETE, 
have safeguards built into 
them that prevent a user 


from erasing the entire data- 
base. Speaking from person- 
al experience, there've 
been many times when I've 
wished for this feature on 
my own database. 

The word processor includ- 
ed in The Lost World is 
called Easy Word, and it 
lives up to its name. It's a 
practical, 40-column word 
processor that is so simple 
to use that kids will enjoy us- 
ing it for reports and other 
writing tasks. Satchel has 
built several safeguards into 
the word processor pro- 
gram, too. For example, func- 
tion keys handle most com- 
mands within the program 
(LOAD, CLEAR, SAVE, 
ERASE, CENTER, PRINT), 
and these commands stay’ 
onscreen throughout the pro- 
gram. That way users won't 
lose any work trying to re- 
member the right command. 

Another safeguard built in- 
to the program restricts ac- 
cess to the Erase option. 
When you press f8 to erase 
files, you get a message in- 
forming you that Erase is a re- 
stricted option. You then 
have to go through several 
more steps, including enter- 
ing the full name of the file 
you want to erase. After all 
these steps, it's rather unlike- 
ly that you'll accidentally de- 
lete an important file. 

| think you're going to be 
very surprised when you 
check out The Lost World. 
This package delivers every- 
thing that its developers 
promise and more. | for one 
am going to be watching for 
more programs bearing the 
Satchel Software name. 
MARTI PAULIN 


Commodore 64 or 128—$39.95 


SATCHEL SOFTWARE 

Distributed by Free Spirit Software 
720 Sycamore St. 

Columbus, IN 47201 

(812) 376-9964 

Circle Reader Service Number 414 


WESTERN WESTERN 
Graphics for WESTERN HERITAGE HERITAGE 
Commodore 64 = Graphics 
& Side AorB Graphics, Borders, and Fonts for the Print Shop . for IBM 
Print Shop, and Original 
compatible Print Shop 
programs like $24.95 
Fun Graphics ‘ ee 
Machine. PNG eS 


text A  . 3 
C64 WESTERN 5 i eae eo = 
HERITAGE aOR UK An. 512.00 
$24.95 OF - ‘Austaaa $16.00 
Binal " 2 WAR tm $1.92 


509-276-6928 


week é a dil 
We take Visa & RE BVAG] = 
Master Card rs 
eae 
Specify C84 or tip, 
IBM 5-1/4 or 3-1/2 se 
C64 Version will be 


sent Hf none is Vemion for the Commodore 64 Inchides 9 Pin and 7 Pin Printers 
specified. 


Bible Search 3.2 


. The entire Old & New Testament text on 4-1541/71 disks. 

. An Exhaustive English Concordance on 2-1541/71 disks. 
Indexes every word in the entire Bible; 700,000+ references, 

Incredible five (5) second look-up time, per/word, per/disk. 

. Instant, automatic spell checking of more than 12,800 words. 

. Wildcard and boolean AND, OR & NOT search options. 

. Search the entire Bible in 5 seconds with 1581 or HD (v 3.52). 

. Money back guaranteed! 


KJV $49.95 | NIV $59.95 | KJV & NIV $90 


Includes: C64 & C128 programs; screen, printer and disk output; 

users guide, disk case. Available on 7-1541/71, or 4-1581 disks. 
"= Any questions? Call or write for more information. 

Also available! Amiga, Bible Search 


Big Blue Reader 128/64 - 4.0 


Transfers word processing, text, ASCII, and binary files between 

(64/128 and IBM PC compatible 360K 5.25" and 720K 3.5" disks. 

New Version 4.0 features: Transfers ASCII, PET ASCII and Screen 

Code files including: WordWriter, PocketWriter, SpeedScript, PaperClip, 

WriteStuff, GEOS, EasyScript, Fleet System and most others. 

Supports drives # 8-30. New Backup (C128) and Format (1571/1581) 

programs, Reads MS-DOS sub-directories, uses joystick, and more. 
Includes C128 & C64 programs. Requires 1571 or 1581 Disk Drive, 


Big Blue Reader 128/64 - 4.0 only $44.95 
Version 4.0 upgrade, send original BBR disk plus $18, 
COD. US funds only. 


= . No Credit Card orders. 
Canada & Mexico add $4 S/H, Overseas add $10 S/H ($5 BBR) 


SOGWAP Software @ (219)724-3900 


115 Bellmont Road; Decatur, Indiana 46733 


ne 


NAMBwW 


Create a Total Western Environment with 143 designs 
90 Graphics, 42 Borders and 11 Fonts for the Print Shop. 
All New Western Designs by Professional Artists, 

+ Instructions to make 10 Gunfighters of the Old West, Wanted Posters, 
+ Authentic Indian Symbols Font, designed for secret messages. 

+ Matching Fonts, Borders, and Graphics, for a Professional look. 

» Comes in a Beautiful Collectors Notebook, to Organize your Creations. 


x Old Ranch Brands, Wagons, Horse Shoes, Cattle, Engish Riders, Gunfighters, Indians, 
Cowboys, Ropes, Hats, Boots, Saddles, and more. 


fe oe Stim 4i 


Horse Feathers Graphics, N, 27310 Short Road, Deer Park, WA. 99006-9712 


Order by check, money order, or 
e 


Circle Reader Service Number 234 


“Gazette Gallery,” where each month we present the 
very best in original 64 and 128 artwork. 
So don’t waste another moment. Subscribe to- 
day to COMPUTE’s Gazette Disk and get 12 issues 
for only $49.95. You save almost 60% off the single- 
issue price. Clip or photocopy and mail completed 
% coupon today. 
Individual issues of the disk are available for 


& $9.95 (plus $2.00 shipping and handling) by writing 


to COMPUTE, 324 West Wendover Avenue, Suite 
200, Greensboro, North Carolina 27408. 


YES! Start my one-year subscription 
to COMPUTE’s Gazette Disk right away 
for only $49.95.* 

O Payment enclosed (check or money order) 

OCharge OMasterCard O Visa 


| 
| 
Yes, save time and money! Subscribe to the Gazette ! 
Disk and get all the exciting, fun-filled Gazette pro- 
grams for your Commodore 64 or 128—already on | 
disk! | 
Subscribe today, and month after month you'll 
get all the latest, most challenging, and fascinating | 

programs published in the corresponding issue of | Acct. No. Exp. Date 

COMPUTE. ! Signature 

| 

| 

| 

| 

| 

| 

| 

| 


New on the Gazette Disk! In addition to the Name er 
programs that appear in the magazine, you'll also addrass 
get outstanding bonus programs. These programs, ’ 
which are often too large to offer as type-ins, are Ser ZIP] 
available only on disk—they appear nowhere else. Province Postal Code 


As another Gazette Disk extra, check out Mail to COMPUTE's Gazette Disk, P.O. Box $250, Harlan, IA 51593-2430 
Residents of NC and NY, please add appropriate sales tax for your area. Canadian 


orders, add 7% goods and services tax. 


The classic best-selling 
Commodore 64 reference 


MAPPING 
THE 


Commodore 


64 &64C 


VIDEO DIGITIZER 


There’s a new digitizer on the market. 
This German import, called simply Vid- 
eo Digitizer, is distributed in the U.S. 
by RIO Computers. Video Digitizer 
does far more than simply replace Com- 
puterEyes, which has been discontin- 
ued—it leaves it in the dust! 

The screen image is limited to stan- 
dard Commodore high-resolution, and 
you need a decent image and a stable 
source signal if you hope to accom- 
plish anything. But this little gem man- 
ages to find a clean image where Com- 
puterEyes could see only black-and- 


guide. Mapping the Com- 
modore 64 and 64C is a 
comprehensive memory 


guide for beginning and advanced programmers. 


white streaks. | ran the cable from my 


new VCR (which 
making sure it cou 


bought only after 
id produce a nearly 


perfect freeze-frame) to my Commo- 


dore 128 (in 64 mo 


de) and compared 


Video Digitizer with ComputerEyes on 


the same video image. Video Digitizer 


To order your copy send $18.95 plus $2.50 for shipping and handling 
(U.S., $4 to Canada and $6 other) to COMPUTE Books, c/o CCC, 2500 


created a perfectly 
of Captain Kirk, w 
covered the poor c 


presentable picture 
hile ComputerEyes 
aptain with streaks. 


supplies last. 


McClellan Ave. Pennsauken, NJ 08109. (Residents of NC, NJ, and NY 
please add appropriate tax; Canadian orders add 7% Goods and Servic- 
es Tax.) All orders must be paid in U.S. funds drawn on a U.S. bank. 
Orders will be shipped via UPS Ground Service. Offer good while 


OMNI 
TIME CAPSULES 


ope) 


Now the magazine of the future can be 
kept for the future. Store your issues of 
OMNI in a new Custom Bound Library Case 
made of black simulated leather. It’s built to 
last, and It will keep 12 issues in mint 
condition indefinitely. The spine is embossed 
with the gold OMNI logo, and in each case 
there Is a gold transfer for 
recording the date. 


Send your check or money order 
($8.95 each; 3 for $24.95; 6 for $45.95) 
postpaid USA orders only. Foreign 
orders add $1.50 additional for 
postage and handling per case 


To; OMNI MAGAZINE 
Jesse Jones Industries, 499 E. Erie Ave. 
Phila., PA 19134 


CREDIT CARD HOLDERS (orders over $15) 
CALL TOLL FREE 1-800-825-6690 

Or mail your order, clearly showing your 
account number and signature, 
Pa. residents add 7% sales fox. 

SATISFACTION GUARANTEED 


No Wild, No Wildlife. 


Ne wel 


<— 


PHOTO: TOM & PAT LEESON 


Life in the wild can be pretty tough these 
days. Without the necessary ancient-forest 


habitat to live in, some species like the 
northern spotted owl of the Pacific North- 
west are severely threatened. 


At the Sierra Club, we believe that these 
owls and the ancient forest ecosystems they 
depend on need our help. 


To learn more about our work protecting the 
forest habitats of endangered species such 
as the northern spotted owl, write or call: 
Sierra Club, Dept. PB 
730 Polk Street, San Francisco, CA 94109 
(415) 776-2211 


| was impressed! 

Of course, any digitized image 
needs at least a little touching up. 
With ComputerEyes this always meant 
loading a third-party conversion pro- 
gram such as Icon Factory and porting 
the image over to Doodle or geoPaint 
for touch-ups. Video Digitizer, on the 
other hand, has a drawing program 
called Eddison that's built right in! As 
a matter of fact, Eddison is a full-fea- 
tured, sophisticated graphics tool in its 
own right. In a sense, Video Digitizer is 
an add-on accessory to Eddison, not 
the other way around, After all, the dig- 
itizer is controlled from an icon that's a 
selection on Eddison's menu, just like 
the pencil or brush choices. 

Video Digitizer scans an image in 
black-and-white or gray scale. The for- 
mer requires less time to scan and is 
considerably more forgiving about the 
picture you choose. It creates a very 
recognizable scan of a person's face, 
for example, even if it’s not a close- 
up. The downside is that the image is 
comprised of areas that are strictly 
black or white. There are no shades of 
gray between the two. You can manu- 
ally set the threshold level (the dark- 
ness level at which the software choos- 
es to make a pixel black instead of 
white), which greatly alters the look of 
the scan. This high-contrast image is 
great for many things. If you plan to re- 
size the image later in a program like 
geoPublish, it's the only way to go. 

Gray-scale scans are created with a 
myriad of dots in patterns to create lev- 
els of gray. This sounds great in theo- 
ry, but when it comes down to prac- 
tice, there usually isn’t sufficient con- 
trast in the source image to give you a 


well-defined image. This isn’t a flaw in 
the Video Digitizer, however; Comput- 
erEyes does the same thing. A live vid- 
eo image from a video camera with 
good lighting to create sharp contrast 
can be scanned successfully this way. 
A video tape image, on the other 
hand, will usually wash out. Fortunate- 
y, it's a simple matter in Eddison to 
scan and rescan using various meth- 
ods until you come up with an image 
you like. This is perhaps the single 
most impressive feature of the Video 
Digitizer system. You not only have the 
choice of repeating your scan quickly 
and easily, but you can also immediate- 
ly use Eddison to alter each image to 
see if it fits the bill. This little unit, bare- 
ly the size of a standard cartridge, isa 
joy to work with. 

This is not to say that everything is 
perfect. Probably the biggest draw- 
back to Video Digitizer is its price. The 
competition (now limited to VideoByte 
and its companion cartridge, Video- 
Mate) retails for less than half Video Dig- 
itizer's price. Granted, Video Digitizer 
runs circles around VideoByte’s convert- 
ed multicolor images if you want a high- 
resolution scan and can justify the 
price. 

Another major disappointment is Vid- 
eo Digitizer's documentation. Like Vid- 
eoFox ‘and other products in this line, 
the manuals for Digitizer and Eddison 
are poor translations of the original Ger- 
man, with sentences running from com- 
ical to unintelligible. A number of fea- 
tures are so poorly described that | 
was forced to give up when | couldn't 
figure them out by trial and error. Rich- 
ard Ollins, president of RIO Comput- 
ers, assures me that a new comprehen- 
sive set of manuals are available. With 
the new documentation, all the prod- 
ucts in this line, including VideoFox, Pa- 
geFox, and the new genlock that RIO 
plans to release, will be integrated in- 
to an impressive set of graphics and vid- 
e0 tools for the 64. 

If you're a “Star Trek” and a graph- 
ics fan like me and dream of using 
great pictures on your computer of 
Spock, the Enterprise, and maybe 
your brother, then Video Digitizer is 
worth the cost. | know I'll gladly ear- 
mark $250 for one when my strained 
budget allows. I've never been so sad 
as when | had to pack up this review 
unit of Video Digitizer and ship it back 
to the company. 

STEVE VANDER ARK 


Commodore 64 or 128—$249 


RIO COMPUTERS 

3430 E. Tropicana Ave., Ste. 65 
Las Vegas, NV 89121 

(702) 454-0335 


Circle Reader Service Number 415 o 


C64/128 PUBLIC DOMAIN SOFTWARE 
REQUEST FREE CATALOG or send $2 for sample disk and catalog (RE- 
FUNDABLE). Categories include education, utilities, games, business, 
PRINT SHOP graphics, pre-tested programs and more. Rent for 75¢ or 


buy as low as $1.00 per disk side or for 80¢ for 70 or more. $20 order 
gets 4 free disks of your choice. 
NEXT DAY SHIPPING! 
eS CALOKE INDUSTRIES (Dept. GK) 
= PO BOX 18477, RAYTOWN, MO 64133 


SINCE 1986 
Visa) 


Circle Reader Service Number 181 


DEPENDABLE SERVICE FOR YOUR COMMODORE! 
C-64, 1541, C-128, or 1571:==FAST TurnaRounp! 


$25 .°° pLus parts AUTHORIZED COMMODORE 
Send computer* or drive with name, ad- SERVICE CENTER 
dress, phone, & describe problem. We'll ts ke ke ek 
call with parts estimate, then repair and 90 DAY WARRANTY 
return to you insured by UPS. Payment ON ALL REPAIRS 
can be COD or VISA, M/C. Minimum 
charge, estimate only is $20. * Include power supply. 


503 East St. Dept. C 
TYCOM Inc. 


Pittsfield, MA 01201 


(413) 442-9771 


Circle Reader Service Number 242 


Upqrada your Commodore systam 
Refurbished Hardware 
MOMITORS DRIVES OTHER 
WOH F219 4t~ F 99 Cod Fas 

Wdic~ F103 & 9 
1S41-il-F139 1 


modems 
MG Beve 


Va02- Seog 
1902 $319 


Ramlink & Ram 3 Battery 
49 Ramilink base Ramecrd=l-$1 
KSFIG—15 Itavfaces~ $75 RL Battery) Wiag-$69 — deg-F219 
SOFT 45-20 Rare vanderbIT9 NE DRIVES! OOO-F319 = FOAG! 


ie How anngthang’ cone auighe ture et 
J.P. PBM PRODUCTS BY Mall 
NSheridan Mall Postal Outlet, 
DOWNSUIEL, GNTARIC, M3L 12 
Allow 4-6 weeks for delivery. 
Cotaloge disk om 64 format Fé 


ESCAPE ROUTE 
The Adventures of 


Eric Hawthorne, P.I. 
C-64 or C-128 In 64 MODE 
ACTION/STRATEGY/BOARD GAME 
Catch the infamous ICELADY before she crosses the border! 
Fun for all ages! 
$19.95 Check or Money Order 
CREATIVE PIXELS LTD. 
PO Box 592, Library , PA 15129 


Circle Reader Service Number 113 


SUPER MARIO BROS 
FOR THE C-64/128! 


This fantastic PD version boasts 32 worlds, 
dazzling graphics and awesome sound! 37 OTHER TOP QUALITY GAMES are 


included on two disks! At 32 cents a game, this is a bargain a true game lover 
can't pass up! To order, send your return address & $9.00 for each Game Pack 
plus $3 postage and handling to: 


PowerDisk + 6813 Lotus Way, West Jordan, UT 84084 


™ Super Mario Bros. is a registered trademark of Nintendo. 


MAY 1993 COMPUTE 


G-11 


G-12 


The 64’s 

missing memory, 
loading the first 
file in a directory, 
and more 


COMPUTE MAY 1993 


FEEDBACK 


Why Only 39K? 

If the 64 has 64K of memory, 
how come only 39K is availa- 
ble to BASIC programming? 


A. MARIE 
SAN ANTONIO, TX 


At the heart of all personal 
computers is the microproces- 
sor. In the 64, this processor 
is the 6510, a variation of the 
6502 used in the Apple. One 
characteristic of this chip is 
that it can access only 64K of 
memory at a time. 

If the designers of the 64 
simply filled the computer 
with 64K of empty memory, 
the machine would be help- 
less. Computers need certain 
built-in programs to function. 
Don't confuse these built-in 
programs with the programs 
you write yourself or load 
from disk. The built-in pro- 
grams are stored in special 
memory chips called ROM 
(Read Only Memory). Unlike 
other programs, they remain 
safe in their ROM memory 
chips even when power is 
turned off. The BASIC lan- 
guage itself is one of these 
programs. Another program 
is the computer's operating 
system, which performs house- 
keeping duties. 

These internal programs 
need some of the 64K of 
space that the 6510 micropro- 
cessor chip can address. To 
make room for them, the 64 
designers used some of the 
RAM area. That's why, when 
programming in BASIC, you 
have only 38,911 bytes of 
memory. The 25K of RAM 
that appear to be missing are 
taken up by the BASIC inter- 
preter program, the operating 
system, and other things. The 
designers did make it possi- 
ble, however, to switch off the 
64's ROM, thus freeing the 
full 64K of RAM underneath. 

Unfortunately, when you 
switch off BASIC and the op- 
erating system, you are left 
with what amounts to an un- 


conscious computer. You 
must replace the operating 
system software with some of 
your own that takes care of 
the necessary housekeeping 
tasks. Since BASIC is gone, 
this replacement must be ma- 
chine language. Therefore, 
the full 64K of RAM is availa- 
ble, but only to advanced pro- 
grammers fluent in machine 
language. 


Load Me First 

| have a question about mak- 
ing a menu program the first 
one on a directory. | have a 
disk of files, and no matter 
how often | save the menu pro- 
gram, it doesn't come first in 
the listing. | want to be able to 
load the menu by simply typ- 
ing LOAD‘*”.8 and RUN. 
How do | do that? 


T. AIGHT 
BOSTON, MA 


You can load the first pro- 
gram on a directory listing 
with LOAD“*".8 only if you're 
loading a program for the 
first time. After that, that com- 
mand will load the last pro- 
gram loaded. To load the first 
program any time, use LOAD 
“0:*",8. Now let's address the 
real question. 

To make any program the 
first program on the disk re- 
quires that the program that 
is currently first be replaced. 
Here's how to do it. 

Place the disk you want to 
rearrange into the disk drive. 
Load and list the directory. 
Note the program at the top 
of the directory list. (Press 
Run/Stop if necessary to 
keep the list from scrolling off 
the screen.) This first program 
on the disk is the one you'll 
have to move to make room 
for your menu program. 

Use the COPY command 
to duplicate the first program 
with another name, for exam- 
ple, OPEN 15,8,15, “COPYO: 
newname=oldname”; CLOSE 
15. Newname is the name of 


the copy, and oldname is the 
name of the original. 

Once you've copied the pro- 
gram elsewhere on the disk, 
you can safely delete the orig- 
inal with the SCRATCH com- 
mand: OPEN 15,8,15, ‘SO: 
oldname": CLOSE 15. As be- 
fore, oldname is the name of 
the original. Now you can use 
the RENAME command to 
change the new name back 
to the original. Its format is 
OPEN 15,8, 15, "RO: oldname 
=newname”: CLOSE 15. Now 
you have two possibilities. If 
your menu program is already 
on the disk, you can use the 
COPY command, which will 
move the menu to the front of 
the disk. If the menu program 
isn’t already on the disk, in- 
sert a disk that contains the 
program and load it in. Re- 
place that disk with the one 
you've been working with and 
save the menu program to it. 

If you've done everything 
right, your menu program 
should now be the first pro- 
gram on the disk. Test it by 
by entering LOAD'0:*",8. 


Underlining 

| have a 64, Cardco + G inter- 
face, Star SG10 printer, and 
WordPro 3 Plus word proces- 
sor. | can't get my system to 
underline anything. All four 
products claim to support un- 
derlining, so please tell me 
what to do in this regard. I'm 
not that knowledgeable 
about BASIC programming or 
the equipment. My main de- 
sire is to use the equipment 
for word processing. 


PENNY CAESAR 
FORT WAYNE, IN 


One of the most common 
questions we receive is how 
to get a certain printer to 
work with a certain interface 
and a certain software pack- 
age. Although the questions 
are similar, there are literally 
hundreds of answers, depena- 
ing on what hardware and soft- 


Gazette 
Index 


Everything’s included! 
Features, games, reviews, 
education/home applications, 
programming, bugswatter, 
feedback, and columns! 


A superb interface includes pull- 
down menus, help screens, and 
keyboard, joystick, or mouse con- 
trol. Features include super-fast 
searching and sorting capabilities. 
An options screen allows you to 
choose text colors, drive number, 
and input device. And there’s full 
documentation on disk. 


Choose from three modes of opera- 
tion—browse for quick scanning, 
view for detailed information and 
descriptions, and edit for adding 
items from upcoming issues—and 
print to any printer. There’s even a 
turbo-load option for maximum 
disk-access speed. 


ORDER YOUR 
GAZETTE INDEX 
TODAY! 


(MasterCard and Visa accepted on 
orders with subtotal over $20.) 


To order, send $7.95 per disk, the 
quantity of disks ordered, check 

or money order,* your name and 

complete street address: 


Gazette Index 

324 West Wendover Avenue 
Suite 200 

Greensboro, NC 27408 


*Please add $2 shipping & handling ($5 foreign) for 
each disk (residents of NC, NJ, NY please add appli- 
cable sales tax; Canadian orders, add 7% goods 
and services tax). 


All payments must be in U.S. funds. Please allow 4 
weeks for delivery. 


The 


GRAPEVINE GROUP ,._., 


Inc. 


COMMODORE UPGRADES 


512K RAM EXPANDERS 


y special arrangement with Commodore, we have purchased. 512K 1750 RAM expander units for 
your C64 or C128 computer. These have been factory upgraded from 1764. Now keep up with the 
iatest technology. Upgrade to 512K with a simple plug-in module. Completely compatible and 
comes with software. If you have a C64 you will need a heavier power supply (4.3 amp), which we 
will give you for $31.00. C128 users do not need this power supply. This is the original Commodore 


2 unit with over 800,000 sold. Last chance to get more memory! 


$99.95 


Super 1750 REU CLone (512K). Does not require a larger power supply 


© COMPUTER SAVER: This C-64 Protection System saves you costly repairs. Over 52% of C-64 

1) failures are caused by malfunctioning power supplies that destroy your computer. Installs in seconds 
b between power supply & C-64. No soldering. 2 yr. wty. An absolute must and great seller..$17.95 

@ PRINTER PORT ADAPTER by Omnitronix. Avoid obsolescence. Allows you to use any 
Commodore (C-64) printer on any PC compatible or clone. Does not work with Amiga. ...$34.95 


COMMODORE DIAGNOSTICIAN II 


Originally developed as a software package, then converted to a readable format, the Diagnos' 
cian has become a fantastic seller. With over 38,000 sold worldwide, Diagnostician I! utilizes 
> sophisticated cross-reference grids to locate faulty components (ICs) on all C-64 and C1541 
computers (C-128/64 mode). Save money and downtime by promptly locating what chip(s) have 
failed. (No equipment of any kind needed.) Success rate from diagnosis-to-repair is 98%. Includes 


basic schematic 


$6.95 (Available for Amiga computers with 3%” disk at $14.95). 


NEW POWER SUPPLIES 


® Asuper-heavy, repairable, 


\ot sealed” C-64 power supply with an output of 4.3 amps (that's over 


3 3x as powerful as the original). Featuring 1 yr. wty., ext. fuse, schematics, UL approved ... $37.95 


(Includes bonus Commodore Diagnostician II (valued @ $6.95) 


© OurBiggest Seller ® 1.8 amp repairable heavy duty supply for C-64, (Over 120,000 sold)..$24.95 


© A500 45 watt (heavy duty) Standard replacement .. 
© 200 Watt “Big Foot” A500 Universal Switching Power 


$67.50 
ing for 


hard disks, etc. An absolute must for those adding on more memory/peripherals (e.g. Prima) 


Works in all countries worldwide. A natural replacement 
Y © A200 110/220 volt P/S (200 watts/fan) by Commodore 


$86.95 
$129.50 


REPLACEMENT/UPGRADE CHIPS & PARTS 


6510 CPU.. 


PLA 906114 

All 901/225- 

4164 (C-64/RAM) 

C-128 ROMs Upgrade (se' 

C1571 ROM Upgrade (310654-05) ... 


#693 C64 to 3 pin RCA (eg. 1084) 


1541/1571 Drive Alignment. 


Super Graphics by Xetec .. 2 
Service Manuals for C64, C128, 1802, 1084SP, 1541 


p EMERGENCY STARTUP KITS 


Si 


Ars 


‘ave a lot of time and money by repairing your own Commodore or Amiga computer. All chips are 
irect socket plug-ins (no soldering). Each kit includes all you need to “start up"/revive your 


- broken computer. Originally blister packed for the government PXs worldwide, this series is now 
available to you. Total cost savings per kit far exceeds purchasing chips on an individual basis. 


= 


| =e 


KIT #3 (Part #DIA 15) for C64 
Symptoms: No power up ® Screen lock up ® Flashing colors © Game cartridge problems 
Contains: ICs #PLA/82S100/906114, 6526, Commodore Diagnositician, Fuse, Chip Puller, 8 RAMs, 
Schematic, Utility Cartridge & special diagnostic test diskette with 9 programs 
An $87.50 value for only $29.95 


KIT #4 (Part #DIA 16) for C64 
Symptoms: Control Port * Sound © Keyboard © Serial device problems 
Contains: ICs #6526, 6581, 8 RAMs, Commodore Diagnostician, Fuse, Chip Puller, Basic Schematic, 
Utility Cartridge & special diagnostic test diskette with 9 programs 
A $79.80 value for only $29.95 


KIT #5 (Part #DIA 17) for 1541/1571 
Symptoms: Drive runs continuously # Motor won't stop ® Read errors ® No power up 
Contains: ICs #6502, 6522, Fuse Chip Puller, Basic Schematic, Commodore Diagnostician & special 
diagnostic test diskette with 9 programs 
An $70.10 value for only $29.95 


KIT #1 (Part #DIA 14) for Amiga 500/2000 
Kit corrects 28 symptoms and includes: Two 8520A CIA Chips, 8362, 8370, 8364, Chip Puller, Fuse, 
Schematic, Diagnostician Booklet & The Final Test Diskette. A $224.00 Value for .. 
w/8373 Super Denise 


A $79.80 value for only $29.95 


Send For Free Catalog 
3 CHESTNUT ST., SUFFERN, NY 10901 © ORDER LINE 1-800-292-7445 FAX 914-357-6243 
CUSTOMER SERVICE: 914-368-4242 ¢ INTERNATIONAL ORDER LINE: 914-357-2424 


We Ship Worldwide ® Prices subject to change © 15% Restocking Charge 
re 


Holiday Hours: 9-7 E.T. M-F; 10-2 E.T. Sat. 
Tell a friend you've heard it through the Grapevine. 


Circle Reader Service Number 145 


Underlining from 
within a 


word processor, and 


impossible to load 


G-14 


COMPUTE MAY 1993 


FEEDBACK 


ware are being used. Given 
three interfaces, five printers, 
and seven word processors, 
you could find 105 different 
ways to hook them up and 
possibly 105 different an- 
swers to the question of under- 
lining. Unfortunately, we don't 
have access to much of the 
equipment or software men- 
tioned, so it's difficult for us to 
find the specific answer. 

There are three routes you 
could take: First, write or call 
the manufacturers of your print- 
er, interface, and software. 
The worst that could happen 
is that you'd get no reply. If 
you bought your printer at a lo- 
cal Commodore dealer (very 
few of those, these days), 
someone at the store may be 
able to help. 

Second, try contacting a lo- 
cal user group. You may find 
someone there who has simi- 
lar equipment. Or perhaps 
someone with printer experi- 
ence can help you find the an- 
swer through experimenting. 

Third, check your printer 
manual for the codes that 
turn underlining on and off. In 
your case, the way to enable 
underlining should be ESC - 
1, which means send an es- 
cape (ESC) character, a mi- 
nus sign, and a CHR$(1). To 
disable underlining, you'd 
send ESC - 0. This is often 
called an escape sequence 
because you use the ESC 
character followed by a se- 
quence of one or more other 
characters. The ASCII value 
of ESC is 27, and the ASCII 
value of the minus sign is 45. 
To test this, enter and run the 
following BASIC program. 


10 OPEN 4,4 

20 PRINT#4,CHR$(27); CHR$(45); 
CHRS(1); 

30 PRINTS$4,‘‘THIS SHOULD BE 
UNDERLINED.”; 

40 PRINT#4,CHR$(27); CHR$(45); 
CHRS$(0); 

50 PRINTS$4,‘‘ AND THIS IS NOT.” 

60 PRINT#4:CLOSE 4 


If the printer underlined the 
first sentence, but not the sec- 
ond, you have the proper 
codes. 

If it didn't work, there 
could be several things 
wrong. Here's where it be- 
comes a little complicated. 
You may have mistyped the 
program; check the spelling 
and punctuation. The inter- 
face may have intercepted 
the codes before they 
reached the printer. Escape 
sequences can sometimes 
be used to program interfac- 
es as well as to set printer op- 
tions. If you have such an in- 
terface, it may have seen the 
ESC and thought that it was in- 
tended to be an interface 
code and not a printer code. 
If that’s the case, you'll have 
to send ESC twice. Usually, 
when a programmable inter- 
face receives two ESC 
codes, it sends the second 
one to the printer. 

Another potential problem 
is that the DIP switches on 
the printer or interface might 
be in the wrong position. DIP 
switches control the way your 
interface or printer acts. 
These vary widely from brand 
to brand, so check the printer 
manual and the interface man- 
ual for guidance on the prop- 
er settings. 

Finally, it may be that your 
printer needs a different es- 
cape sequence for underlin- 
ing; again, it's necessary to 
check your manual. 

Before you start experiment- 
ing with the word processor, 
try to underline from a BASIC 
program. When you know the 
proper escape sequence 
from BASIC, you'll be pre- 
pared to try it from the word 
processor. 

Some word processors use 
printer files to keep track of 
various printer settings. 
When you place a generic un- 
derline command in the doc- 
ument, the proper escape se- 
quence is sent when you print 


the document, providing 
you've previously loaded the 
correct printer file. 

Other word processors re- 
quire you to know the com- 
mands to enable or disable un- 
derlining and other features. 
You'll have to check the doc- 
umentation for your word proc- 
essor. If you need to use the 
commands, you'll have to de- 
fine three format keys for 
CHR§(27), CHR&(0), and 
CHR§$(1). Then, whenever 
you want to underline, place 
the defined key for 27, -, and 
the key for 1 in the text of 
your document. 


Unloadable Files 

| remember seeing a program- 
ming tip somewhere that pro- 
tected files from being loaded 
by unauthorized people. It re- 
quired a code to load. Do you 
know of such a way that | can 
protect my programs? 

RAY FISHER, 

PALATKA, FL 


There are a number of ways a 
programmer can “lock” his or 
her BASIC programs from pry- 
ing eyes, but here's a simple 
way that won't force you to re- 
member any exotic codes. 
Just remember the character 
string (CHR$) for a comma, 
which is CHR$(34). 

When you are ready to 
save your program, use this 
format: SAVE ‘filename’+ 
CHR&(34),8. Use your own pro- 
gram name for filename. 
When you list the disk's direc- 
tory, this program will appear 
normal. Try to load it, howev- 
er, and you'll get a FILE NOT 
FOUND error. To load the pro- 
gram, you'll have to enter 
LOAD" filename"+CHR$(34),8. 


Send your questions and com- 
ments to Gazette Feedback, 
COMPUTE Publications, 324 


West Wendover Avenue, 
Suite 200, Greensboro, North 
Carolina 27408. i) 


PUMP UP 


YOUR PRODUCTIVITY! 


Harness the potential of your, 


64 and 128 with these 
powertul programs. 


Get more work out of your 64 and 128 
with these two new disk products from 
COMPUTE's Gazette — the 1992 
Best of Gazette Utilities, and 

the Gazette Graphics Grab 
Bag! 

The 1992 Best of 
Gazette Utilities 

Seize control of your operating 
system and your world! 


Here's what's on it-MetaBASIC 64, 
MetaBASIC 128, Quick, Sprint Il, 
Ultrafont+, RAMDisk 64, RAMDisk 128, 
BASSEM, SciCalc 64, List Formatter, 
MegaSqueeze. 


The Gazette Graphics 
Grab Bag 


Do it all with Commodore 

graphics! 
Here's what's on it— 
Starburst Graphics, 
Screen Designer 128, 
128 Graphics Compactor, 
64 Animator, VDC Graphics, 
Dissolve 128, Super Slideshow, 
128 Animator, 1526 PrintScreen, 
Supratechnic, Medium-Resolution 
Graphics, Screen Maker, GAS!64— 
Special Edition, GAS!128—Special 


ORDER 
THEM 
TODAY! 


Extend Your Computer Power With This Powerful Software! 


YES! want to pump up my productivity! Please send me the 
@ disks checked below at $11.95 each. 


The 1992 Best of Gazette Utilities 
___ The Gazette Graphics Grab Bag 
—— Subtotal 


_— Sales Tax (Residents of NC and NY please add appropriate sales tax for your 
area. Canadian orders, add 7% goods and services tax.) 


_— Shipping and Handling ($2.00 U.S. and Canada, $3.00 surface mail, $5.00 
airmail per disk.) 


_— Total Enclosed 


L MasterCard and VISA accepted on orders with subtotal over $20. 


___ Check or Money Order MasterCard _ VISA 


Credit Card No. Exp. Date | 


Signature 
(Required) 


Daytime Telephone No. 


Name 


Address 
City 


State/Province 


ZIP/Postal Code 


Mail this coupon to COMPUTE's 1991 Utilities, 324 West Wendover Ave., Ste. 200, 
Greensboro, NC 27408. 


Readers respond 
with their own 


programs to generate 


G-16 


52 nonrepeating 
random numbers. 


COMPUTE MAY 1993 


BEGINNER BASIC 


Larry Cotton 


NONREPEATING 
NUMBERS RETURN 


Last November, | challenged 
you to submit programs that 
would generate nonrepeating 
random numbers in either BA- 
SIC or machine language. 
Thank you for your responses. 
Appropriately, all of the re- 
sponses were in BASIC. (I'd 
hoped for a few ML versions, 
but | suppose mine couldn't 
be improved. In my dreams!) 
The object was to compare 
BASIC and ML speed by gen- 
erating 52 nonrepeating num- 
bers, such as you get when 
shuffling a deck of cards. 
And the winner is Howard 
Monroe. (I'm sorry, Howard. | 
misplaced your envelope, so 
| don't know where you live.) 
Here’s Howard's program. 


5 PRINT'‘(CLR)(DOWN)PRESS 
ANY KEY TO RANDOMIZE 52 
NUMBERS” 

6 PRINT WITHOUT 
REPEATS.”:PRINT 

7 GETAS:IFAS="'"THEN7 

10 C=52:0=RND(-TI/101) 

20 DIM R(C),X(C) 

25 REM INITIALIZE THE DECK 

30 FORI=1T0C:X(1)=1:NEXTI 

35 REM GENERATE 52 RANDOM 

NUMBERS BETWEEN 1 AND 52 
INCLUSIVE 

40 FORI=1TOC:R(I)=INT(C*RND(1)) 

+1:NEXTI 

45 REM GENERATE THE RANDOM 

PERMUTATION 
50 FORI=1TOC:A=R(!):B=X(I): 
X(I)=X(A):X(A)=B:NEXTI 

60 FORI=1T0C 

70 PRINT X(I), 

80 NEXTI 

90 PRINT:PRINT:PRINT‘ ‘AGAIN? 

(Y=YES, N=NO)":PRINT 

100 GETAS:IFAS<>"Y" THENIF 

AS<>‘'N" THEN100 
110 IFAS="N” THENEND 
120 GOTO40 


Howard points out that the im- 
portant lines are 10-50 and 
that in reshuffling the “deck,” 
it's important to branch back 


to line 40, not line 30. 

His program is unique in 
that the time it takes to gener- 
ate the 52 numbers is virtual- 
ly the same each time the pro- 
gram runs. This is not so of 
my primitive version or of any 
of the other submissions that 
rely on IF-THEN statements to 
test the random numbers, 

Howard's program requires 
only 118 jiffies (I'll explain this 
term in a moment) to gener- 
ate the 52 numbers. To time 
how long a routine takes, add 
a line like this where you 
want the timer to start. 


1 Ti$="'000000" 


A clock, based on the 64's 
CPU clock, measures time in 
jiffies (about '/eo second). The 
jiffy clock can be set to 0 with 
a line like that above. From 
then on, that clock runs fran- 
tically until it’s reset. 

If you'd like to see the jiffy 
clock in action, just type 
PRINT Tlin immediate (nonpro- 
gram) mode and press Re- 
turn. Do this a few times and 
watch as the jiffies fly by. In 
program mode, you would 
add a line number to the com- 
mand, such as 55 PRINT TI. 

The clock is set to 0 in line 
1, and line 55 prints the num- 
ber of jiffies that have elapsed 
since then. Everything that 
happens between line 1 and 
line 55 is timed in jiffies. 

But | digress. My Novem- 
ber program often took 4700 
or more jiffies to generate the 
52 numbers. Howard's speed- 
enhanced version blew mine 
away by a factor of almost 40. 
All other programs submitted 
beat mine by factors of 2-15. 
My next challenge was to see 
if | could squeeze any more 
speed out of Howard's pro- 
gram. Yes, | could—but not 
much. First, | changed his ran- 
dom statement in line 40. 


40 FORI=1TOC:R(I}=INT 
(C*RND(.))+1: NEXT 


The number inside the paren- 
theses that follows RND can 
be anything, so | made it 0. Ac- 
tually, by substituting a period 
for the numeral 0, it works 
even faster. This shaved 18 jif- 
fies off Howard's time. Then | 
combined the last two FOR- 
NEXT loops into one and 
dropped the | variable. This 
eliminated a calculation and 
shaved another 14 jiffies. 

| tried using DEF FN to de- 
fine the RND function, but 
that actually slowed down the 
program. | also tried making 
the 1 in line 40 a constant; 
that didn't help either. So 
here's the speed-enhanced 
version. It times everything up 
to the actual printing of the 
numbers and also rudely 
strips away the program's us- 
er-friendliness. 


10 TIs="000000" 

20 PRINTCHRS(147) 

30 C=52:0=RND(-TI/101) 

40 DIMR(C),X(C) 

50 FORI=1TOC:X(I)=I:NEXT 

60 FORI=1TOC:A=INT(C* 
RND(.))41:B=X(I):X(I)=X(A); 
X(A)=B:NEXT 

70 PRINTTI:PRINT 

80 FORI=1TOC 

90 PRINTX(|), 

100 NEXT 


An elegant (albeit slower) 
version by David Zammat of 
Summit, New Jersey, tests 
whether each new integer gen- 
erated has been used previ- 
ously. If it hasn't, the program 
prints it and generates anoth- 
er one. | received several var- 
iants of this program 


10 D=52:DIM U(D) 

20 FOR C=1 T0 D 

30 N=INT(D*RND(1))+1 

401FU(N)=OTHENU(N)=1:PRINTN;: 
NEXT:END 

50 GOTO 30 


Again, thanks, Howard, 
David, and all the others for 
your input. I'll try to offer anoth- 
er challenge before long. 


DISKS O'PLENTY INC 


8362 PINES BLVD. SUITE 270A 
PEMBROKE PINES FL 33024 
(305) 963-7750 


Call or write for free descriptive catalog of 
C64/128 Public Domain & Shareware 
Choose from over 900 Disks 
Adult list of over 50 Disks available 
to those 18 or over. 


021MU SID MUSIC UTILITIES 


019GR PRINTSHOP UTILITIES 
019ED JR HIGH EDUCATION 
062ED HIGH SCHOOL EDUC. 
033ED TYPING / SPANISH 
031ED COMPUTER SCIENCE 
O10UT PIRATES TOOLBOX 
119GA FOREIGN ARCADE 
022GA CASINO-BOARD GAMES 
021GE GEOS FONTS 

002MS LOTTERY PROGRAMS 
003MS COLLECTORS CORNER 


Circle Reader Service Number 253 


Choose 6 for $5.00 
LIMITED OFFER 


This publication is available 
in microform from UMI. 


800-521-0600 toll-free 
313-761-4700 collect from Alaska and Michigan 
800-343-5299 toll-free from Canada 


Few gifts actually 
improve with age. 
Your bank se 
one of them. 


Visit your bank for the gift 
that improves with age: 
a U.S. Savings Bond. 
For more information, write: 
| Office of Public Affairs, 
U.S. Savings Bonds Division, 
Washington, DC 20226. 


&X 
Take SAVINGS 
Tse), . BONDS 


A public service of this magazine 


eS C-128 E 
4 1541 Repair Amiga 500 BD $70.00 
1571 Repair Amiga 1000 BD $87.00 


SX64 $65.00 Amiga 2000 BD $25.00 
=| 4 PC-10, PC Colt Motherboard$110.00 All Commodore monitors $67.00 


repair $35.00 


128D - $70.00 


Computer Technologies 

1313-B Washington Ave. 
Discount for dealers & schools Titusville, FL 32780 
Prices subject to change without notice (407)-269-1081 


AUTHORIZED COMMODORE SERVICE CENTER 


Circle Reader Service Number 284 


Prices include parts/labor 
Except PS and drive 


FAST ACTION ARCADE STYLE GAME FOR THE COMMODORE 64/128+1541 
$24.95 PLUS $3.00 SHIPPING AND HANDLING IN THE U.S.A, 
SHIH CANADA $5.00 AND $10.00 FOR ALL OTHERS, 
AMERICAN CURRENCY ONLY 

SEND CHECK OR MONEY ORDER TO;  MICROSTORM SOFTHARE 
Box 1086 Stoney Hr. 59270 


Circle Reader Service Number 289 


KeyDOS ROM Version 2 is here! 
The KeyDOS ROM is a chip for the empty socket inside your C128 that adds more than 40 
powerful features. KeyDOS is available instantly as soon as you switch on your 128! 
KeyDOS is loaded with useful tools to simplify file access on multiple drive systems without typ- 
ing file names—all major DOS functions included. Select multiple files for copying, viewing, 
printing, renaming or scratching. ASCIV/CBM/Screen code converter. Full support for 1581 
subdirectories, Built-in RAMDOS for REUs up to 2MB, New GEOS SupeRBoot 
Alarm clock, Disk editor, Powerful debugger. 

Only $32.50, Satisfaction Guaranteed! Write for more information, 
Enhance your system with the speed and convenience that KeyDOS provides! 
Antigrav Toolkit, PO Box 1074, Cambridge, MA 02142 
Shipping outside of US, Canada and Mexico add $3 


Circle Reader Service Number 244 


NEW! COMPANION FS-4 ultimate upgrade for Fleet System 4, and Fleet Filers 64/128. Transfer 
Fleet Software to any 15XX or hard drive, CMD's RAM LINK or RAM DRIVE. Max speed and 
productivity! Filers 64/128 access up to four drives, set screen colors, function keys re-programed, plus 
many other improvements, Templates, help files, spiral bound manual plus much more. C~128/80col. 
$24,95+83.00 S&H 
SEC CHECK REGISTER 128, V2.0 fast efficient personal or small business checking. Fast data 
entry, bank transactions predefined. Unlimited payees. 750 active file transactions. History files. 
999 reference (account) numbers. Easy editing, Reports, Outstanding Trans.t, Trans.f, Ref.# Ref. & 
Date, Date, Date & Random Ref.#, or Payee, Print personal or form feed checks. Supports all drives. 
Custom video fonts. $/B manual and much more, C~128/80.col. $24.95 +$3.00 S&H 
ORDER TODAY: Check or Money Order. Missouri Res. add 6,225 % sales tax. 

SPARKS ELECTRONICS, 5316 So. 9th, St. Joseph, MO 64504-1802 

‘Trademarks of respective manufacturers/publishers acknowledged 


Circle Reader Service Number 252 


COMPUTER REPAIR se 


C-64: $40.00 1541; $54.95 64C: $50.00 
1541-Il: $64.95 C128: $64.95 C128D: $74.95 
1581: $64.95 EIC..... 

WE ALSO REPAIR IBM Clones, Sega, Genesis, Nintendo 


For more info cal: BEAR TECHNOLOGIES 


Computer Sales, Service & Repoir 


1005 McKean Street, Philiadelphia, PA 19148 ‘ 
ical 215-336-5295 1-800-755-5295 & 


Circle Reader Service Number 152 


G-18 


Create an 

array in BASIC 
and modify 

it with machine 
language. 


COMPUTE MAY 1993 


MACHINE LANGUAGE 


Jim Butterfield 


ARRAYS 


If you create an array in BA- 
SIC, that array can be used or 
modified by machine lan- 
guage programs. The start-of- 
arrays pointer tells where to 
find the first array, Using the 
pointer, the ML program looks 
for the array it wants and then 
goes for the data. 

The first two bytes of an ar- 
ray give its name. The next 
two bytes give the array’s 
size, which enables a pro- 
gram to leap ahead to the 
next array if desired. The fifth 
byte contains the number of di- 
mensions. Following that, 
each dimension has a two- 
byte number that shows its 
size (including the 0 element). 
Thus, a one-dimensional array 
has seven bytes of header ma- 
terial, after which the data is 
stored. Integer arrays—which 
we'll use in our sample pro- 
gram—store each value in two 
bytes. 

The start-of-arrays pointer 
may be found at addresses 
$2F and $30 on the VIC-20, 
Plus-4, and 64. The 128 sites 
the pointer at $31 and $32— 
but be careful, the values them- 
selves are stored in bank 1. 

Let's take a look at a sam- 
ple program that uses BASIC 
to set up an integer array. 
We'll then ask a machine lan- 
guage program to calculate a 
Fibonacci series and place it 
in that array. A Fibonacci se- 
ries starts with values 1 and 1 
(or 0 and 1, if you like). Each 
new value is the sum of the 
two previous values. The se- 
ties goes 1, 1, 2, 3, 5, 8, 13, 
and so on. 

Our BASIC program cre- 
ates only one array. To keep 
Our program small, we won't 
check the array name, but we 
will check its size, since the cal- 
culated values should not over- 
run the array area. 

The code starts by copying 
the start-of-arrays pointer into 
awork pointer at $22 and $23. 


033C: LDA $2F: STA $22: LDA $30 
:STA $23 


Next, we extract the size of 
the array and add it to the ar- 
ray address. That gives us 
the address of the next array, 
the end of this one. We'll 
store it at $08C0/1. 


LDY #$02: CLC; LDA ($22),Y: ADC 
$22: STA $03CO 

INY: LDA ($22),Y: ADC $23: STA 
$0301 


Skip seven bytes to get 
past the header data. 


LDA $22: ADC #$07: STA $22: BCC 
$0360: INC $23 


The array initially contains all 
Os. Reaching beyond element 
0, we'll change element 1 toa 
value of 1. 


0360: LDY #$03: LDA #$01: STA 
($22),Y 


Now the program proceeds 
to set up a second pointer, 
with a value of the first point- 
er plus 2. These two pointers 
will reference adjacent values 
in the array. 


CLC: LDA $22: LDY $23 

ADC #$02: STA $24: BCC $0372: 
INY 

0372: STY $25 


Here comes our main loop 
in the program. We add togeth- 
er the two pointed-at values 
and put the result temporarily 
on the stack. 


0374: LDY #$01: CLC: LDA 
($22),Y: ADC ($24),Y: PHA 
DEY: LDA ($22),Y: ADC ($24),Y: 
PHA 


Now we bump the pointers to 
the next set of values. 


CLC: LDA $24: LDY $25: STA $22: 
STY $23 

ADC #$02: BCC $0390: INY 

0390: STA $24: STY $25 


If we have moved beyond 
the array's end, we'll exit. 


CMP $03C0: TYA: SBC $03C1: BCS 
$03A9 


Otherwise, we bring back the 
value from the stack and 
store it in the new array loca- 
tion. Then we loop back. 


LDY #$00: PLA: STA ($24),Y 
INY: PLA: STA ($24),Y 
CLC: BCC $0374 


If it's time to exit, we must re- 
member to remove the two un- 
wanted bytes from the stack. 


O3A9: PLA: PLA: RTS 


You may change the size 
of the array as defined by the 
DIM statement in the BASIC 
program, but integer arrays 
can't hold a value greater 
than 32,767. 

Don't forget that BASIC 
can move arrays to a new lo- 
cation to make room for new 
variables, Always work from 
the start-of-arrays pointer; its 
value may have changed 
since you last used it. 


EG 8@ PRINT "(64 ONLY) M/L ARR 
AY ACCESS" 

XK 96 DIM A%(20) 

EM 160 DATA 165,47,133,34,165, 
48,133,35,168,2,24,177, 
34,101,34 

HE 11@ DATA 141,192,3,200,177, 
34,161,35,141,193,3,165 
134,165,7 

AA 120 DATA 133,34,144,2,238,3 
5,160,3,169,1,145,34,24 
1 165,34 

XC 130 DATA 164,35,105,2,133,3 
6,144,1,200,132,37,166, 
1,24 

CE 14@ DATA 177,34,113,36,72,1 
36,177,34,113,36,72,24, 


165,36,164,37 

DATA 133,34,132,35,165, 
2,144,1,266,133,36,132, 
37 

DATA 205,192,3,152,237, 
193,3,176,12,160,0,104, 


SH 158 


DK 160 


145,36,206,104 
MJ 170 DATA 145,36,24,144,203, 
194,184,96 
FOR J=828 TO 939 
READ X:T=T+X 
POKE J,X 
NEXT J 
PC 240 IF T<>10638 THEN STOP 
GF 396 sYS 828 
SB 319 FOR J=1 TO 26 
MS 320 PRINT A%(J); 
PP 330 NEXT J o 


PH 202 
EJ 219 
BP 220 
AE 230 


The Gazette 
po memaenaae, § 
Manager 


Harness the productivity 
power of your 64 or 128! 


Turn your Commodore into 

a powerful workhorse, keep track 
of finances, generate reports 
in a snap, manage your 
money in minutes— 

all with the 

Gazette Productivity 
Manager! Look at all 
your 64/128 Productivity 
Manager disk contains. 


GemCalc 64 & 128— 

A complete, powerful, user- 

friendly spreadsheet with all 
the features you'd expect 
in an expensive commercial package 
(separate 64 and 128 versions are included). 

Most commands can be performed with a single keypress! 


YOUR GAZETTE 
PRODUCTIVITY 
MANAGER 
TODAY! 


Memo Card—Unleashes the power of a full-blown 
database without the fuss! Nothing’s easier—it’s a 
truly simple computerized address file. Just type in 
your data on any one of the index cards. Need to edit? 
Just use the standard Commodore editing keys. 
Finished? Just save the data to floppy. What could be 
easier? 


(MasterCard and Visa accepted on orders with subtotal over $20). 


OCYES! please send me Productivity Manager disk(s) 

($14.95 each). 

Subtotal 

—___ Sales Tax (Residents of NC and NY please add appro- 
priate sales tax for your area. Canadian orders, add 
7% goods and services tax.) 

———_ Shipping and Handling ($2.00 U.S. and Canada, $3.00 
surface mail, $5.00 airmail per disk.) 


Financial Planner—Answers all of those questions 
concerning interest, investments, and money manage- 
ment that financial analysts charge big bucks for! You 
can plan for your children’s education and know 
exactly how much it will cost and how much you need 


to save every month to reach your goal. Or, decide 
whether to buy or lease a new car. Use the compound 
interest and savings function to arrive at accurate 
estimates of how your money will work for you. 
Compute the answer at the click of a key! 


DON’T MISS OUT ON THIS 


POWERFUL WORKHORSE! 


——— Total Enclosed 
— Check or Money Order MasterCard — VISA 


Credit Card No. 


Signature 


(Required) 
Daytime Telephone No. 


Name 


Address 


City 


State/ 


uP/ 
Province Postal Code 


Send your order to Gazette Productivity Manager, 
324 W. Wendover Ave., Ste. 200, Greensboro, NC 27408. 


Hackers have 
discovered many 
quirks in the 


64—here are a few. 


G-20 


COMPUTE MAY 1993 


PROGRAMMER'S PAGE 


Randy Thompson 


TRIVIAL PURSUITS 


Believe it or not, the 64 is over 
ten years old, the 128 a ma- 
ture eight. That's almost a life- 
time in computer years. Dur- 
ing this tenure, hackers have 
found many quirks in these ma- 
chines. Here are a few. 


READY or Not 

In the old days, it was 
thought that the OUT OF DA- 
TA message that spuriously 
appears when you're editing 
a program was caused by 
some bug in the computer's 
operating system. Not so. 

As many alert program- 
mers might observe, this 
message occurs when you 
press Return while the cursor 
is on the same line as the 
READY prompt. Notice that 
the word READY can be inter- 
preted as the BASIC state- 
ment READY, which is exact- 
ly what the computer tries to 
do: read information from a da- 
ta statement. If your program 
doesn't have any data state- 
ments, the computer replies 
with the cryptic but correct 
OUT OF DATA ERROR. lf 
your program does contain da- 
ta, your computer reads the 
value into Y and then re- 
sponds with a more reasona- 
ble sounding SYNTAX ER- 
ROR, because the period (.) 
that follows READY is not a val- 
id BASIC command. 

Another common typing mis- 
take is to type the command 
RUN on top of the READY 
prompt. This produces the 
word RUNDY, which your com- 
puter rarely accepts. In most 
cases, your computer com- 
plains with an UNDEF'D 
STATEMENT error because it 
cannot interpret the charac- 
ters DY as a valid line num- 
ber. However, whenever the 
BASIC interpreter is unable to 
find a line number, it tries to 
jump to line number 0. So by 
starting all your programs 
with line 0, you can enter RUN- 


DY—or RUNIT, or RUNNY, or 
even RUNAWAY—to start 
your program. For the same 
reason, you can enter GOTO 
without a line number or even 
GOTOJAIL or GOTOGO to 
start a program from line O. 


How Old Is Your 64? 

If you own an early-model 64, 
then you've probably encoun- 
tered the infamous lockup 
bug. To see if you're one of 
these lucky people (| am!), 
turn on your computer, move 
the cursor down to the last 
line, and hold down the 
space bar until the cursor 
passes the right edge of the 
screen twice. Next, hold 
down the Del key until the cur- 
sor moves back to the far 
right column. If you own a 64 
with the lockup bug, the 
words LOAD, ?SYNTAX ER- 
ROR, READY, and RUN ap- 
pear on the screen, and the 
computer locks up. If you 
have a program in memory, it 
runs, The cursor continues to 
flash, but the computer ig- 
nores your keypresses, even 
Run/Stop-Restore. 

If you own a Datasette (re- 
member them?), you can de- 
feat the bug by simultaneous- 
ly pressing the left Shift key 
and 3, or X and 5, or V and 7, 
and so on (every other key 
from left to right on the top 
and bottom rows). The 
screen will display PRESS 
PLAY ON TAPE. Press Play 
on the Datasette and then 
Run/Stop. Your computer will 
return to normal. Disk drive 
owners can avoid the bug if 
the first line in the program in 
memory is OPEN 15,8,15:IN- 
PUT#15,S$:CLOSE 15, 

Interestingly, the lockup 
bug will occur only when 
your cursor color is red, cyan, 
blue, yellow, light red, dark 
gray, light blue, or light gray. 
Safe colors are black, white, 
purple, green, orange, 
brown, medium gray, and 
light green. 


Beyond the Call of Duty 
Although the widest Commo- 
dore screen is 80 characters, 
the number used in a TAB() 
function can be as large as 
255. For example, on a 40- 
column screen you can use 
PRINT TAB(240) to move the 
cursor down six lines. Any 
number greater than 255 re- 
sults in an ILLEGAL QUANTI- 
TY error. 

As with the TAB() function, 
the ON X GOTO statement 
can't handle numbers greater 
than 255. This is contrary to 
early Commodore documenta- 
tion, which states that nega- 
tive numbers and numbers 
greater than 255 cause the 
64 to fall through to the next 
program line. Negative num- 
bers and numbers greater 
than 255 both produce /LLE- 
GAL QUANTITY errors. 


Keyboard Confusion 
Plug a joystick into port 1, 
turn on your computer, play 
with the joystick, and watch 
your computer screen fill with 
seemingly random charac- 
ters. This happens because 
the joystick port shares the 
same CIA chip and |/O lines 
as the keyboard, 
If you're short a joystick 
and need to emulate one, try 
these alternatives. For exam- 
ple, just as pressing the joys- 
tick's fire button produces a 
space, hitting the space bar 
makes a program think that 
you've pressed the joystick's 
fire button. To simulate joys- 
tick up, press 1; joystick 
down, press back arrow (©); 
joystick left, press Ctrl; and 
joystick right, press 2. 


Send your programming tips 
(or trivia) to Programmer's 
Page, COMPUTE’s Gazette, 
324 West Wendover Avenue, 
Suite 200, Greensboro, North 
Carolina 27408. We pay $25- 
$50 for each tip that we pub- 
lish in this column. o 


Only $24.85 fete ST HE? 


run Graphins Machine 


Fu FGM) 1S AN “ALL-IN-ONE” GRREHIGS 
PROGRAM C=64. WHAT CAN BE ATED WITH FGM IS 
ONLY Cnt TED Wy YOUR MRE INAT ION T A FEW EXAMPLES: 


WORKS WITH 


SUPPORTS 1541, 15719 


CmO ORIVES 


& 1581 DRIVES 
ares 


FUN GARPHICS mA 
HI-RES SCREENS 


BY RESETTING 
HICS MACHINE, 


LAY ---$3.5! 
64) OR C64 IS ShibeeD 


‘ODD 
f>z00 


Sones Hobe HOOREOHSEH ROE ARORA IEE IOE AOA RD IOIEIIE 
The FGM Connection, P.0.Box 2206, Roseburg, OR. 97470 


FOR MORE INFORMATION CALL 503-673-2234 


COMPUTE’s 


If you own a CMD device, you 
NEED the Compression Kit 


PRESSION KIT 


ackul en featuring fast 


NEW! 


pression forthe commodore 64/128 
id unreliable.disk copiers away 
Compression Kit! 
of these drives, 1541 
a /CMD 


* FREE shippingor dvance orders! 


100% fast machine language coding. Easy 

menu driven operation. No cryptic command 

codes! No evil disk protection! 99 .99994% 
ca d us 

° 


Mad Man Software 
1400 East College Drive 
Cheyenne, Wy. 82007 


1(800)34-MADMAN 1(800)346-2362 


Circle Reader Service Number 260 


SpeedScript Disk 


A powerful word processing 
package for Commodore 64 
and 128 owners 


A Great Deal for Commodore 
Users! 


* SpeedScript for the 64 

° SpeedScript 128—80-column version 
* Spelling checkers 

* Mail merge 

* Date-and-time stamp 

* 80-column preview for the 64 


¢ Turbo save and load 


¢ Plus more than a dozen other SpeedScript 
support utilities all on one disk (including 
full documentation) 


copies of COMPUT! 
‘ SpeedScript Disk 


I've enclosed $11.95 plus $2.00 postage and handling. (Outside 
U.S. and Canada add $1.00 for surface mail or $3.00 for 
| airmail.) 


| ORDER NOW! 
| 


Amount 
Sales Tax’ 


OL 


Name 


Address 


State 


Mail personal check or money order to 


| 

Ve 

| 

| Commodore SpeedScript Disk 
| 324 W. Wendover Ave., Ste. 200 
| 

| 


Greensboro, NC 27408 


Residents of North Carolina and New York, add appropriate tx for your area, Canadian 


orders, add 7, good and services tax 


Please allow 4-6 weeks for delivery. Program available only on 54-inch disks. 


G-21 


G-22 


Try these disk 
collections 
for some great 
GEOS finds. 


COMPUTE MAY 1993 


GEOS 


Steve Vander Ark 


MORE GREAT 
GEOS GOODIES 


Last month | talked about 
some of the latest GEOS share- 
ware/public domain programs 
on QuantumLink, but Q-Link 
isn't the only place to find 
GEOS applications. You can 
find some great programs in 
other GEOS collections. 

These are disks that con- 
tain a number of GEOS files. 
You'll find a wide variety of 
goodies, from utilities and appli- 
cations to clip art files and 
fonts. Some of the programs 
and fonts | use most often 
came on a collection disk. 
Here are some sources. 


GEOS Powerpack 
GEOS Powerpack, Power- 
pack Il, and GEOS Compan- 
ion are collections released 
by RUN magazine. The disks 
are still available, and they're 
probably the best GEOS col- 
lections ever released. You'll 
want to get all three. 
Powerpack includes such 
gems as Write Hand Man, a 
writing and pattern analyzer, 
and PaintView II, a geoPaint 
viewer which includes an op- 
tion to save part of a geoPaint 
file as a Doodle file. There's a 
card file database as well as 
Thumbnail, a utility that cre- 
ates miniature versions of ge- 
oPaint documents to be used 
as clip art or printed by the 
page full for reference copies 
of your collection. There's al- 
so a version of Breakout for 
GEOS. The fonts, particularly 
those by Susan Lamb, and 
the scanned, high-quality clip 
art images are spectacular. 
Powerpack || contains the 
updated version of geoTerm 
for the 64 and 128, games, 
and a simple word processor, 
which imports and converts 
text files in ASCII. An interest- 
ing utility on the disk creates 
a stand-alone documentation 
file from a geoWrite docu- 


ment. Unfortunately, all the 
documentation for the pro- 
grams is included in that 
form on the disk itself, leaving 
little space for clip art files 
and fonts. 

The GEOS Companion 
disk boasts a music editor 
and an animation program, 
as well as a 1581 boot disk 
creator and other excellent util- 
ities, including a batch load- 
er. There are more fonts, in- 
cluding one of my personal 
favorites, Smith Corona (regu- 
lar and megafont versions), 
and still more clip art files. 
Thankfully, this disk has a sep- 
arate manual instead of on- 
disk documentation files. 

As of this writing, these 
disks are available from Tech 
Media, Special Products, 
P.O. Box 2151, Salisbury, Mar- 
yland 21802. You can order 
by calling (800) 824-5499. 
The two Powerpack disks are 
$19.97 each; GEOS Compan- 
ion is $24.97. Add $3.95 ship- 
ping and handling to each or- 
der, not each disk. 


Collette Utilities 

Jim Collette is so well known 
and admired for his GEOS pro- 
gramming that Creative Micro 
Designs figures that his 
name on a disk is enough to 
get folks to buy this collection 
of his better utilities. This is 
CMD's most recent GEOS re- 
lease. Included are updated 
versions of some of the finest 
GEOS programs ever written: 
geoWizard and the premier 
font creator, Font Edit. Also in- 
cluded are Mini-Desk, one of 
the more useful desk accesso- 
ries; a utility which automatical- 
ly places the current photo 
scrap into the first photo al- 
bum on the disk; a set of Post- 
Script utilities for laser print- 
ing; and a DOS wedge. As 
always, Jim's programs are us- 
er-friendly and user-proof. 
The $34.95 price is ridiculous- 
ly inexpensive for these quali- 
ty programs. You can order 


the collection from Creative Mi- 
cro Designs, P.O. Box 646, 
East Longmeadow, Massachu- 
setts 01028. To place an or- 
der call (800) 638-3263. 


GeoPowerTools 
The folks who publish Lode- 
star, the magazine on a disk 
for the Commodore, offer a col- 
lection of utilities by Scott 
Resh, a talented GEOS pro- 
grammer. PowerTools _ in- 
cludes several photo albums 
of excellent clip art and a num- 
ber of fonts. For sheer num- 
ber of files for your dollar, you 
can't beat this disk of 21 utili- 
ty programs and games. 
You'll find BASIC 8-to-Amiga 
format conversion programs, 
directory and sector editors, a 
program which prints the con- 
tents of the Date Book that 
your GEOS Calendar uses, a 
nifty desk accessory that 
turns any part of the visible 
screen into a photo scrap, a 
fast formatter, a SID music 
player, and a utility that prints 
multiple copies of a geoPaint 
document. You can get this 
collection from Softdisk, P.O. 
Box 30008, Shreveport, 
Louisiana 71130. Or order by 
calling (800) 831-2694. The 
price is $9.95 plus $4.50 ship- 
ping and handling. 


COMPUTE’s GEOS Collection 
COMPUTE also has a collec- 
tion of GEOS programs, select- 
ed from the Gazette section 
of COMPUTE magazine. In- 
cluded on this disk are a cou- 
ple of nifty games—! like 
Skeet, myself—and utilities 
such as a word counter for 
geoWrite, a screen dumper, 
and a help file creator. The 
disk also includes a nice mul- 
tidensity printer driver for Ep- 
son-compatible printers. This 
collection is available for 
$13.95 (shipping and han- 
dling included) from COM- 
PUTE, 324 West Wendover Av- 
enue, Suite 200, Greensboro, 
North Carolina 27408. o 


We live in an ocean of air, 
Deprive us of it for a moment and we suffer. 


People with chronic lung disease — asthma, emphysema, and chronic bronchitis — 
know this all too well. 


Your support of the American Lung Association can help them stem the tide. 


It’s a matter of life and breath? 
AMERICAN 
LUNG 
, ASSOCIATION* 


‘The Christmas Seal Peopie* 


‘Space contributed by the publisher as public service 


8BIT 


PO BOX 542 
LINDENHURST NY 11757-0542 


6PACSETS 
PD & Shareware Sets 
ABIGHIT AT 
ONLY $5.00 
1: ASST: StarTrek+ 
3: EDUCATIONAL 


1.6 Megabyte 3.5”..... $ 215.00 
100 Megabyte HDD. $ 750.00 


(Trigger, Thumb, and 
both left & right base.) 
Hand Contoured Stick 
And 4 suction cups on 
the tattoas of the base: 
fc 
repeat | Aterey 
ONLY $19.00 ONLY $15.00 


even whik you type! 


COMMERCIAL SOFTWARE CLOSEOUTS| J: Telecommunications| 
Original Packages ONLY $5.00 cach! 
PUFFY’SSAGA, PARADROID, 
BLOCKOUT, DIE HARD 
CLUBHOUSE SPORTS 


WE ARE ALWAYS ADDING NEW TITLES TO 
OUR COMMERCIAL SOFTWARE STOCK ! 
CALL TO SEE WHAT’S NEW THIS MONTH ! 


SIX PAC #2$ 10.00 
ADULT IMAGES 
You must be over 18 
To receive this 6PAC! 
Signature Required ! 
Call to request a more 
descriptive 6 PAC list || 


SHIPPING $2.00 For First Itcm + $1.00 cach additional item 
*U.S. Funds Only! *SORRY NOC.O.D.’s OR CREDIT CARD ORDERS, 
FOR A FREE COPY OF OUR CATALOG, CALL: 
(516)-957-1110 MONDAY - FRIDAY 10am to 5pmEST 


Circle Reader Service Number 162 


NEW PRODUCTS From Makers of RAMDRIVE 


BBG RAM 


Battery Back-up 
Ram Disk for 
GEOS 2.0 and 
GEOS 128, 2.0 


¢ Magnitudes faster than any floppy or 
hard drive 

¢ 2MEG model has capacity of TEN 1541’s 

e Includes GEOS application to select one of 
up to five 1571's 

* Reboots GEOS from BBG Ram quickly and quietly 

e Supplied with wall mount power supply and 
battery cable and holder 

e Automatically detects power out and switches 
to back-up mode 

e Activity light indicates access 

e Battery used only when wall mount AC power 


supply off 

MODEL 512 1 MEG 2 MEG 

$CALL $CALL $CALL 

e@ 

e PAEsRise ©) iRuMeAN-GwE 
PE RAIS 4A ESR AisdsSinc: 


BBU 


Battery Back-up 
Interface 

Module for 
Commodore 

17xx REU’s and 
Berkley Softworks’ 
GEORAM 512 


Reset button without data loss 

Activity indicator light during access 

Battery low voltage indicator 

Wall-mounted power supply and battery holder 
and cable supplied 

GEOS compatible, allows reboot to GEOS 
Automatic battery back-up, no switches to push 
Battery powers unit only when AC power off 

BBU supplies power to 17xx REU’s and GEORAM. 
Commodore heavy power supply not required 


FOR INFORMATION CALL $5hQ°° 
=m 
VISA 
ae] 


1-518-436-0485 
Call: 1-800-925-9774 


GEOS registered Trademark of Berkley Softworks, Inc. 


Please Add: 
5 Upper Loudon Road U.S. $6.00 S&H 
Loudonville, New York 12211 Canada $10.00 S&H 
$4.00 C.O.D. 


Circle Reader Service Number 153 


TV-zapping cowboy 


in your family 


with a remote that 


G-24 


accesses 
1500 channels. 


COMPUTE MAY 1993 


D'IVERSIONS 


Fred D'Ignazio 


WHEN TELEVISION 
GOES DIGITAL 


| opened the Wall Street Jour- 
nal today, and a story jumped 
out at me. It described how 
TCl—Tele-Communications 
Incorporated—may soon offer 
500 TV channels to its 11 mil- 
lion cable viewers. TCI is the 
nation’s largest cable TV oper- 
ator. It's now allying itself with 
two other cross-industry heavy- 
weights, AT & T and General 
Instrument Corporation, to up- 
grade its analog cable system 
to a digital network. This new 
network, according to the Jour- 
nal, will “open the gates for a 
vast sea of entertainment and 
information options for cable 
subscribers.” 

The conversion to digital is 
possible because of advanc- 
es in video and sound com- 
pression. Complex mathemat- 
ical algorithms hard-wired into 
special-purpose (digital signal 
processor) computers in TV 
programmers’ studios will 
shrink a TV signal to one-tenth 
of its normal size. This will al- 
low cable to carry ten times to- 
day's 50 or 60 channels. All 
this is possible without con- 
verting the standard coaxial ca- 
ble to the more expensive fi- 
ber optic cable. As fiber optic 
cables replace coax, howev- 
er, we'll see another threefold 
jump in cable capacity. 

Backyard satellite-dish own- 
ers will see 30 to 50 new digi- 
tal TV channels on their TV 
sets by next summer. The rest 
of us will come online some- 
time in 1994. Once the system 
is up and running, it's expect- 
ed to carry 500 cable chan- 
nels simultaneously. And if 
your local cable uses fiber op- 
tics, you might be seeing up 
to 1500 channels! 

Does this sound like over- 
choice, or what? Can you imag- 
ine the TV-zapping cowboy in 
your family with a remote that 
accesses 1500 channels? It 


boggles the imagination! The 
average zap lasts about 1.4 
seconds, so just completing a 
circuit around the cable race- 
track would take a mind-numb- 
ing 30 minutes. That's 30 min- 
utes filled with random, nonse- 
quential video and sound 
bites, brought to you compli- 
ments of your zippy zapper. 
Most TV shows would be over 
by then, so if your brain isn't re- 
duced to sludge, you can 
blast off into another button- 
pushing blitzkrieg that will last 
another half an hour. 

Fortunately, the move to dig- 
ital cable will result not only in 
more channels but also in a fun- 
damental redefinition of the 
word TV. Fifteen hundred pas- 
sive couch-potato channels of- 
fering video pabulum may 
sound like torture, but that’s on- 
ly if your resident zapper forc- 
es you to sit through an orgy 
of channel-hopping. 

A more sane way to ap- 
proach this new deluge of pro- 
grams is to think of TV in anew 
way—not as disjointed pro- 
grams, but as a multimedia li- 
brary or bookstore. The key to 
this way of thinking will be of- 
fered to you at the time your 
TV is hooked up. It'll be in the 
form of a tiny black box that ac- 
cording to one cable-industry 
official “will be the most pow- 
erful piece of electronics tech- 
nology” in your home. This 
box will feature the most ad- 
vanced multimedia computer 
chips and programs on the 
market. The box won't look 
like a computer, so no one will 
panic. But it'll turn your TV into 
a computer monitor and your 
zapper into a tiny computer 
keyboard. 

The transformation of TV to 
computer will happen just in 
time. Instead of randomly hop- 
ping through a confusing 
flood of 1500 programs, you'll 
have brightly colored comput- 
er menus that will allow you to 
pluck a single program out of 
the vast sea of choices. The 


menus will gently quide you 
(much like a good librarian) in- 
to narrowing your selections. 
Do you want entertainment or 
news? Do you want a first-run 
sitcom or an oldie but goody? 
Do you want nature, history, 
mystery, or trash? The choice 
is up to you. 

Don't think of TV any more 
as TV. Think of it as your own 
private bookstore that houses 
thousands of titles. (At 1500 ti- 
tles an hour, your “bookstore” 
will offer 6000 titles in a single 
evening of browsing.) Your 
bookstore isn’t a standard 
print emporium but an electron- 
ic multimedia bookstore with 
books that spring to life when 
you open them; books that 
spill over with real people; and 
books that talk to you, play mu- 
sic, and captivate you with life- 
like scenes of drama, sus- 
pense, murder, and intrigue. 
You can browse through all 
these myriad titles by casually 
pointing and clicking on menu 
buttons that group the books 
into topics such as fiction, non- 
fiction, biography, current 
events, animals, horror, and sci- 
ence fiction. 

And, remember, this is not 
a commercial bookstore that 
you are visiting. It is your book- 
store, so you can pick up a 
book, mark a page, set the 
book down, and ramble off to 
a different book or a whole 
new aisle. Later on, you can 
continue browsing where you 
left off. Or you can click on 
your VCR and make “photocop- 
ies’ so you can review the 
books at your leisure. Or, you 
can place requests to the ca- 
ble operators, and they will re- 
program a channel and ship 
you just the books that you 
want to see again. 

You'll get all this for only a 
small fee—or maybe a large 
fee. It'll be worth it. And it'll be 
a blissful break from the mad 
TV zapper who is prowling 
around the TV room of almost 
every American family. ia) 


PROGRAMS 


a ESE ES SSE I Eo oe PS 


MAILING LIST 


By Maurice Yanney 

If you want to keep track of names, ad- 
dresses, birthdays, and other informa- 
tion, you'll find Mailing List a flexible and 
useful program. You can easily store in- 
formation for up to 500 people pertaining 
to names, addresses, phone numbers, or 
whatever else you desire. 

Once the data is entered, it can be re- 
trieved based on any of the fields. You 
can also print labels in any desired order 
by activating some or all of the fields. 


Typing It In 

Mailing List is written entirely in ma- 
chine language, but it loads and runs 
like a BASIC program. To type it in, 
use MLX, our machine language entry 
program. See "Typing Aids” elsewhere 
in this section. When MLX prompts 
you, respond with the following values. 


Starting address: 0801 
Ending address: 2238 


Be sure to save a copy of the program 
before exiting MLX. 


Using Mailing List 

When you begin Mailing List for the 
first time or start from a new disk, the 
program will create files to hold data 
and information on which records are 
available and which are occupied. So 
use a disk that has plenty of room on 
it. Once the files have been created, 
the program will look for a setup file 
and, if one exists, load it. 

At the top of the screen are three 
pull-down menus: System, Printer, and 
Record. On the right side of the 
screen are five other options called but- 
tons, The main part of the screen dis- 
plays the names of all the fields and 
the information contained in those 
fields for a particular record. 

To select an item, move the arrow- 
shaped cursor with a joystick, mouse, 
or cursor keys. When the cursor is over 
a particular item, it will be highlighted. 
Press the fire button, mouse button, or 
space bar to select an item. 

To select one of the data fields, po- 
sition the cursor over either the name 
of the field or the text area for that 
field. (Some fields are larger than oth- 
ers and thus have a larger area from 


which the field may be selected). 

When one of the pull-down menus is 
selected, a menu containing five en- 
tries appears underneath. To choose 
one of the options from the menu, 
move the cursor to the desired option, 
highlight it, and press either the button 
or space bar. Moving the cursor out of 
the menu area will remove the pull- 
down menu. 


Editing Data 

To edit any of the fields, just move the 
cursor over either the field label or the 
text area and press the button or 
space bar. Once the field is selected, 
the arrow will disappear. The Home 
key positions to the start of the field, 
the Insert key will insert a character, 
and the Delete key removes the char- 
acter under the cursor. The cursor 
keys can also move the cursor left and 
right. While editing a field, the Run/ 
Stop key can be used to cancel the ed- 
it. Run/Stop also restores the field to 
the previous text in addition to exiting 
the current edit. 


Adding Data 

You can enter data by moving to a 
field, pressing the space bar or button, 
typing the desired text, and pressing 
Return. This approach is tedious and 
suited only for editing a few fields of a 
particular record. When adding sever- 
al records, switch to the Add mode. 

To enter Add mode, move the cur- 
sor to the right of the screen and click 
the Mode button. The mode will switch 
from Edit to Add, and the First Name 
field will now be selected. Proceed to 
enter the data. To leave any field 
blank, just press Return. 

When you press Return on the last 
field (Ind 2), the record is written to 
disk, and the program advances to the 
next available record position. Note 
that the Rec # indicator is updated and 
the First Name field is selected. 

Continue this process until you no 
longer wish to add records. To stop en- 
tering data, press the Run/Stop key. 
This will switch the mode back to Edit 
and return the arrow cursor. If any of 
the fields have data when the Run/ 
Stop key is pressed, the data will not 
be stored unless the Write button is se- 
lected. When all 500 record positions 
are filled, you'll get a message telling 


you that no space is available. 

While in Add mode, data in the 
fields remains preserved. If you notice 
a mistake after you've moved to a new 
field, press the Run/Stop key, which 
sets the mode to Edit and returns the 
cursor to the first field. Make the chang- 
es, set the mode back to Add, and con- 
tinue entering data. 


System Options 

To change screen and cursor colors, 
use the System pull-down menu at the 
top of the screen. Highlight the desired 
option and then press either the 
space bar or fire button, Moving the cur- 
sor outside the menu box will remove 
the pull-down menu. 

Once one of these options has 
been selected, the bottom portion of 
the screen will display an arrow point- 
ing to the current value. Move the cur- 
sor left or right and press either the but- 
ton or space bar to select the setting. 


Printer Options 

The options in the Printer menu are 
selected in the same fashion as those 
of the System. The printer options let 
you customize your printed labels. You 
can save the setup, load the setup, re- 
set the default values, set the printer for- 
mat, and print records. 

The first three options are used to 
save, get, and reset the format that the 
labels are printed in as well as to 
save, get, and reset the system op- 
tions. When the Save Setup option is se- 
lected, the current settings for the print- 
er, screen colors, and cursor speed 
are stored in a file. If the file exists, it 
will be overridden. Load Setup will re- 
trieve prior saved settings. Setting the 
default will reset the values to what 
they were the first time the program 
was run. 

When the option to set the printer is 
selected, a new screen appears. Use 
this screen to set the printer device 
number, the printer secondary ad- 
dress, and the label format. To select 
a particular item, move the cursor to 
the desired item and then press the 
space bar or fire button. 

Once an item has been selected, 
the cursor will change to either a mi- 
nus, a vertical bar, or a plus. The new 
cursor signifies the direction the cursor 
keys, joystick, or mouse can be 

MAY 1993 COMPUTE  G-25 


PROGRAMS 


TSE RAS LES EE PS MTD a POE EE ND POE ERE DR 


moved to change the selected item. 
When the item is a number (such as 
the printer device number), moving up 
increases the value by one; moving 
down increases the value by ten. 

If the item is one of the label fields, 
then the cursor will be either a minus or 
a plus. Moving left or right will go 
through the various fields, which are ab- 
breviated by three characters: First 
Name (FST), Middle Name (MID), Last 
Name (LST); Address Line 1 (LN1), Ad- 
dress Line 2 (LN2), City (CTY), State 
(STA), Zip Code (ZIP), Phone Number 
(PHN), Other Information 1 (OT1), Oth- 
er Information 2 (OT2), Indicator 1 
(IN1), and Indicator 2 (IN2). 

There is also a Numbers option for 
sending special ASCII codes and a se- 
ries of spaces to separate items. (This 
does not result in any output to the print- 
er. It is used to help improve screen 
readability.) This option is a number be- 
tween O and 255. Moving the cursor 
left or right will change the selection. 
Moving it up will change the value by 
1, and down will change the number 
by 10. (A value of 65, for example, 
would send a lowercase a to the print- 
er.) Some special numbers to keep in 
mind are 10 (linefeed), 13 (carriage re- 
turn), 27 (escape), 32 (space), and 44 
(comma). 

Once the desired option appears, 
press the fire button or space bar to se- 
lect the item. When you've finished mak- 
ing changes to the printer, move the 
cursor to the Done option. 

Mailing List is designed to be flexi- 
ble. This means that carriage returns at 
the end of each line and spaces be- 
tween the fields need to be explicitly 
specified. This is the default setting. 
Most labels require six lines. So if you 
will be printing many labels, make 
sure that there are exactly six carriage 
returns per label, or else they may not 
print properly. Care must be taken in 
setting the fields so as not to exceed 
the label width, since the program 
does not restrict the line width. 

When the option to print the records 
is selected from the Printer menu, the 
bottom of the screen will display two 
choices. You can either print the cur- 
rent record or multiple records by se- 
lecting the Based-On-Get option. This 
second option works in one of two 
ways, depending on the Get mode. If 


G-26 COMPUTE MAY 1993 


the Get mode is Seq (sequential), 
then all the records starting with the cur- 
rent record will be printed. If the mode 
is Patt (pattern), then all records match- 
ing the selected Get pattern will be print- 
ed. The printing can be stopped by 
pressing the Run/Stop key, letting you 
abort or continue printing. 


Customizing the Setup 

Once the printer and screen settings 
are to your liking, save the setup under 
the Printer menu. The next time Mailing 
List is started, the setup file will be load- 
ed, and your favorite colors, cursor 
speed, and label format will automati- 
cally be set. 


Record Options 

The Record options at the top of the 
screen are used to go to the next and 
prior records, set the Get condition, 
count the number of records, or delete 
the current record. 

The Next and Previous Record op- 
tion will obtain the next or the prior re- 
cord. If the Get mode is set to sequen- 
tial, then the next occupied record or 
the prior occupied record is retrieved. 
If the Get mode is set to retrieve 
based on the pattern, then the next re- 
cord meeting the Get option or the pre- 
vious record meeting the requirements 
of the Get option is retrieved. 

To set the Get condition, a new 
screen is displayed. The screen con- 
tains three items which can be modi- 
fied: Get Option, Get Operation, and 
Get String. Cursor to the desired option 
and press either the space bar or the 
button. 

When Get Option is selected, the cur- 
sor changes to a minus. Moving left or 
right changes the current field. Any of 
the data fields can be used in adjust- 
ing how records are retrieved. Once 
the desired field has been reached, 
press the button or the space bar to 
make the selection. 

The Get Operation has three alterna- 
tives: less, equal, and greater. To 
change the condition, move the cursor 
beneath the field, press the space bar 
or button, and then move left or right to 
the desired operator. Once again, 
press the space bar or button to make 
the selection. 

The Get String is the string that the 
Get Option field is compared to. This 


option is selected by moving under- 
neath the field and pressing the 
space bar or button. Once it is select- 
ed, enter the string and press Return 
when finished. 

Move the cursor to Done and press 
the space bar or button to return to the 
main screen, The Get Option, Get Op- 
eration, and Get String will be dis- 
played at the top of the screen. 

The Get mode is useful when look- 
ing for records meeting a specific con- 
dition or for printing records matching 
a particular requirement. Note that al- 
though the Get condition may be set, 
the mode must be set to pattern (via 
the Get button) to take affect. If the 
mode is sequential, then retrieval of the 
records will be sequential regardless of 
how the Get condition is set. 

If, for example, you want to print out 
all the names of people in the state of 
North Carolina, set the Get Option to 
STA, set the Get Operator to equal (=) 
and make the Get String NC. Set the 
Get mode to pattern, go to the Printer 
menu and select the Print Records en- 
try, and then print on the Based-On- 
Get option. 

Other uses of Get involve using the 
Indicator 1 and Indicator 2 fields. 
They can be used to keep track of peo- 
ple on certain lists such as Christmas 
card lists. Each Christmas just print out 
the records where IND1 = Y, or howev- 
er you want to set it. 

The Count Records option displays 
the number of records stored. To de- 
lete a record, first go to the proper re- 
cord number and then select the De- 
lete Record option. The record will still 
be displayed on the screen as a safe- 
guard, but it will be marked as re- 
moved on the disk. If you change your 
mind after deleting the record, press 
the Write button while the information is 
still onscreen. 


Buttons 

The buttons are options that appear on 
the right side of the screen. A button is 
selected by moving the cursor to the 
item and pressing the space bar or 
fire button. 

There are buttons to select a specif- 
ic record number, set mode to Add or 
Edit, set the Get retrieval to sequential 
or pattern, Write a record, and Clear da- 
ta from the screen. 


Once the Record Number is select- 
ed, you must then input a number be- 
tween 1 and 500. If the selected re- 
cord number has data, that data will 
be retrieved and displayed. If no re- 
cord exists, the record number is updat- 
ed, and the data fields are cleared on 
the screen. 

The Mode button toggles between 
Add and Edit. Its use is discussed in 
adding and editing records. 

The Get button toggles the retrieval 
method to either sequential or pattern 
mode. Sequential mode is used when 
records will be retrieved sequentially 
while pattern mode indicates that retriev- 
al will be based on the settings of the 
Get condition. 

The Write button writes the contents 
currently displayed on the screen to 
the current record number. If, for exam- 
ple, you want to update the phone num- 
ber of a friend, first select the proper re- 
cord number, make the change, and 
then press the Write button. If the 
Write button is not pressed, any chang- 
es will be aborted. 

The Clear button clears all the data 
displayed on the screen for a particu- 
lar record. The data is not erased from 
the record on disk. 


MAILING LIST 

$801:0B G8 74 17 9E 32 34 38 6E 
G869:37 GB GB BB 20 26 26 26 96 
G811:28 26 26 26 20 AB C4 BO G6 
$819:3C G8 99 F8 6G BO FD G8 F6 
G821:99 33 G3 88 D@ Fl AG G9 4C 
@829:B9 GC G8 99 FF 63 88 D@ Al 
@831:F7 A9 FF 85 2D AQ 2A 85 E9 
0839:2E 4C @@ G1 1B E6 93 FF FD 
@841:2A AD 26 BY 6E 69 99 E8 25 
G849:67 C8 D@ F7 EE 62 G1 EE 19 
@851:05 G1 C6 F9 D@ ED A2 G3 23 
6859:28 34 63 FO® 33 C9 B7 DB 95 
G861:16 A2 @1 29 34 G3 DG GA AG 
G869:A2 64 26 34 G3 18 69 87 65 
6871:16 65 A2 BA 28 34 G3 85 1D 
9879:A8 AS A7 85 AQ AS FE 85 FB 
6881:F7 AS FF 85 F8 26 6C G3 73 
0889:A5 F8 85 FF AS F7 85 FE 72 
G@891:E8 26 34 G3 DG 1E A2 G8 21 
G899:206 34 63 AB G2 84 AB 85 2A 
G8A1:A6 18 AS FC 65 A6 85 F7 58 
G8A9:A5 FD 65 A7 85 F8 20 6C EF 
98B1:93 4C 13 61 E8 26 34 G3 FB 
G8B9:DG 1c AG G3 84 AB EB 26 36 
G8C1:34 03 FO G8 A2 O8 20 34 F4 
98C9:03 4C 5C Gl A2 OF 20 34 CF 
@8D1:03 E6 A7 4C 5C G1 E8 26 AF 
G8D9:34 G3 DG GA E8 20 34 G3 B2 
G8E1:18 69 G4 A8 DG D6 ES 26 37 
G8E9:34 63 DG GA A2 G2 2G 34 21 
G8F1:03 18 69 G6 D@ ED A2 G8 A2 


G8F9:26 
@9G1:A7 
9969:26 
G911:66 
G919:85 
G921:FF. 
G929:FF 
G931:61 
G939:22 
@941:C6 
G949:A8 
G951:F7 
9959:A9 
G961:F8 
9969:61 
G971:6A 
9979360 
G981:BA 
0989:63 
G991:1B 
9999:7G 
O9A1:1F 
G9A9:13 
99B1:61 
99B9:28 
69C1:80 
@9C9:DG 
G9D1:G6A 
G9D9:88 
G9E1:F@ 
G9E9:99 
G9P1:5A 
@9F9:6D 
GAG1:CO 
GAG9:1E 
GA11:AG 
@A19:AD 
@A21:14 
GA29:87 
GA31:86 
@A39:6D 
GA41:AG 
GA49:28 
@A51:C9 
@A59:11 
GAG61:AG 
GA69:8C 
GA71:GE 
GA79:GF 
GA81:68 
GA89:340 
GA91:6E 
GA99:GE 
GAA1:4C 
GAA9: 06 
GAB1:78 
GAB9:GA 
GAC1:65 
GAC9:6C 
GAD1:62 
GAD9:99 
GAE1:8A 
GAE9:CS 
GAF1:A4 
GAF9:20 
OBG1:66 
GBG9:07 
@B11:84 
GB19:95 
6B21:C6 


63 
FB 
cé 
Bl 
68 
FE 
a7 
4C 
F7 
38 
G2 
91 
GA 
AQ 
16 
9E 
i) 
D2 
79 
76 
1l 
GA 
58 
99 
F9 
25 
gC 
AC 
gc 
@5 
D2 
19 
GA 
18 
46 
A8 
68 
@D 
38 
41 
96 
26 
1A 
G4 
43 
AG 
83 
8c 
69 
F8 
69 
23 
44 
g8 
A3 
cg 
1c 
AA 
3c 
63 
55 
G2 
DS 
66 
1D 
6A 
2D 
14 
4c 
68 


Do 
FG 
FB 
FE 
a4 
ca 
DS 
GE 
38 
85 
C6 
FC 
Bl 
19 
a8 
28 
E7 
96 
85 
1¢ 
29 
D6 
2a 
98 
1A 
F2 
3E 
ag 
ples 
AE 
78 
a7 
BB 
gc 
a4 
AG 
41 
AG 
6B 
18 
g9 
oB 
AG 
67 
ec 
18 
AG 
68 
a2 
23 
a8 
96 
a3 
a2 
46 
3E 
6c 
35 
79 
BG 
60 
85 
13 
C3 
9 
22 
aA 
8A 
72 
ac 


@B29:2D 49 
GB31:8D 56 
@B39:04 4c 
GB41:18 G4 
9B49:48 81 
@B51:AA E3 
GB59:81 67 
@B61:4C SF 
G@B69:CC 81 
@B71:17 CA 
@B79:CD BD 
@B81:C2 5c 
GB89:71 64 
9B91:38 88 
@B99:2C 83 
9BA1:55 3D 
OBA9:22 E6 
@BB1:23 AE 
GBB9:2C 99 
GBC1:A4 49 
GBC9:GF 72 
GBD1:16 88 
@BD9:38 43 
GBE1:47 86 
GBE9:38 C3 
GBF1:60 D9 
GBF9:G1 E9 
6CO1:06 3F 
GCG9:GA 38 
GC11:08 C3 
GC19:8A 86 
GC21:BC G8 
GC29:D8 78 
GC31:DB 6B 
GC39:A7 27 
6C41:04 Bl 
9C49:Cl D8 
@C51:2C 66 
@C59:CD 41 
@C61:7E 28 
GC69:F4 9E 
6C71:17 25 
@C79:E3 El 
@C81:82 C2 
6C89:85 96 
GC91:D8 AG 
@C99:2E 2C 
@CAL:AF 25 
GCA9:B8 81 
GCB1:A9 BA 
9CB9:95 16 
@CC1:08 CO 
8CC9:A9 G4 
@cD1:DC 31 
@CD9:93 31 
GCE1:68 18 
@CE9:2B CA 


@CF9:C1 
6D01:78 3F 
GDG9:GA 46 


9D39:84 OA 
@D41:8D C2 
9D49:C8 8C 
@D51:B2 AA 


65 Gl 36 BE 24 
58 4C 1B 34 C4 
AG 93 1A Dl BS 
1B 39 64 AG 1E 
68 20 F6 C@ EF 
18 AG 48 2c 18 
@6 GB 86 4G 4C 
EG 21 C2 13 BO 
B4 26 20 A2 G9 
64 83 1C 79 6B 
64 Bl FB FA F8 
1B 88 81 96 1D 
14 1A C9 GA AC 
88 AE C2 83 14 
48 63 CC GA AA 
18 66 AG 1C BA 
@G El 4F 11 65 
AS OB 89 D@ EC 
94 2E GA 76 7A 
91 68 BC 1E 36 
44 1E E8 66 99 
46 Fl 60 6E 10 
C3 67 E7 3C 62 
16 88 7A 8A 8C 
8E 8B 69 31 CC 
GF 19 FD 69 82 
OF GE D4 26 08 
93 15 G2 60 AG 
@G A2 16 6D 65 
23 2B 6B 61 CG 
GE GE 58 11 50 
3G 3C 20 8A G5 
11 C8 Dl G1 GE 
AD 9B 68 FG 22 
G1 4C 1A GC G1 
97 94 4B 58 23 
CF F7 8A 9A 21 
21 99 62 54 OD 
C8 GE 66 83 28 
99 86 6G 98 A2 
85 6C C9 33 16 
1c CF 68 86 1B 
8D 56 42 21 46 
89 57 13 GE 58 
EC 66 16 GA GF 
5197 F5 E3 OF 
1A G1 10 8D BS 
AQ BD OF 35 19 
14 99 22 95 71 
D6 C7 84 AO OF 
AB 12 62 5A 90 
A4 82 06 G4 48 
8D DB 31 AQ 87 
A@ 47 B9 C3 29 
D7 E5 GC 70 A8& 
AG 2A 6A A8 BY 
83 B9 57 2C 3D 
@D C8 C@ FA DG 
@1 AA F6 D8 2B 
16 85 GA CD BD 
8C 15 AG AG 5G 
B2 14 30 6E OF 
GC FE 63 41 06 
6F AG 14 B9 Cl 
GB A2 F6 AD 43 
@1 60 32 EG AE 
2B A4 6G 18 60 
34 80 D6 G3 AC 
88 3A 8A 63 18 
AC AG G6 BD E9 


MAY 1993 COMPUTE 


PROGRAMS 


6D59:D8 G4 CA 88 6B 49 8C 25 7D | GF89:4C 10 11 53 69 68 87 51 55 | 11B9:67 Fl 1D ES GF 56 91 GA F4 
@D61:64 54 07 CO 8C E8 42 BE CA | 6F91:31 BS 71 11 1D 8F 6A 48 31 11C1:A9 6% AG F9 99 5D GA 7C 3F 
OD69:F@ 26 C9 BC FO 40 83 87 Al | OF99:23 6F 42 £1 Cl 18 28 OB 55 | 11C9:57 2C 85 7A FS 72 7A 3E A7 
@D71:C4 DO 17 35 12 BD CF 48 @5 | GBFA1L:AG D6 G3 G5 CC 7A BO BE D4 
@D79:@B CE 48 @6 4C 8E DE 5E EE | @FA9:44 G1 1C £3 54 2B AG 55 Bl 
GD81:81 86 B7 68 74 CC F2 DO G7 | GFB1:11 CB 5G 48 C8 48 EG BB 82 
@D89:F3 F7 11 EC CF 47 E7 CE C6 | GFB9:41 18 D2 18 8C 46 FC Al FG 
0D91:47 DF 4C BG GD BY A3 36 A2 | GFC1:G1 GD DG 28 17 10 13 85 E4 
8D99:DD C4 34 96 D7 FO G2 BG 1A | BFC9:G8 82 A4 C5 BC D3 DG 13 E5 | 11F9:87 91 GO GE 67 G6 61 24 SF 
GDA1:D@ C8 E8 26 EE GD FO CC CF | GFD1:24 97 43 1D 84 GC 8A 20 AB | 1201:BG FG CA C9 13 CO 81 G6 54 
@DA9:CC C6 EG 27 FG C4 CC EC 8B | GFD9:59 AA 11 2E 46 FO DF C@ 9A | 1269:2F 1B 1E 74 5G 52 AB G4 B7 
@DB1:A2 C2 4C CE @D AD 7D 80 DE | GFE1:67 FO DB CG 33 DG BC 4A 86 | 1211:68 25 76 29 34 8G 25 4 15 
GDB9:85 G8 G7 AD 25 C9 21 C5 6C | GFE9:GE 17 Bl 63 22 83 10 48 C8 | 1219:87 AS 66 71 29 G6 Cl 26 92 
@DC1:13 22 Al C3 19 83 G8 20 65] GFF1:E4 OF G6 GC 57 51 20 21 29 | 1221:3C OB 20 52 13 91 1D 1F 87 
@DC9:98 38 ED BF Cl @3 F6 39 39 | GFF9:24 4C GF 12 CO 3F DO 1F G4 | 1229:44 E6 81 86 13 A2 61 EC D3 
GDD1:C8 AG G6 2E G8 63 18 GD 17 | 1601:D@ Fl AE £2 2E 16 47 4E BG | 1231:16 16 F5 Gl 1C 46 44 88 33 
@DD9:G1 22 27 F5 67 21 40 E4 66 | 1009:606 E2 D1 82 CG CG Gl FG 78 | 123 
GDE1:ED E4 04 4B 30 AA G2 32 C3 | 1011:3B E@ 7D 4B B9 C2 EB 70 8C | 124 
G@DE9:4A 3E 66 20 10 OE F3 AO 11|1019:09 EG GD 09 83 BY G3 EC 1E | 1249:FG 50 GB 39 58 G2 BB 1D 1c 
@DF1:1E 88 AD 18 GF @9 D8 8A 4D | 1621:4C F9 11 B9 81 EB E2 CE F3 | 1251:D2 G8 ED BA 85 45 CH 58 5G 
@DF9:2E 67 AB C2 83 67 AB 8E 46 | 1629:GA 22 AE C2 AD G4 2B 12 BE | 1259:A9 AG 99 GF G7 86 2A 16 5B 
GEG1:A4 80 8F AB 4F 6D 31 GC DA | 1031:88 20 G4 24 A5 C5 38 ED FE | 1261:74 OD C9 FF EA G8 24 8A 86 
GE69:12 30 GF 98 13 67 1E 26 B7 | 1039:78 2D FO F8 20 6E 12 4C BY | 1269:A4 G6 71 FO 20 3E AG GC ES 
GE11:67 39 28 FO 19 50 43 21 C4 | 1041:72 11 D5 DD 21 64 52 80 BS | 1271:8A 17 G3 82 24 FS 16 7B C9 
@E19:AD Cl 51 71 8A E7 28 C@ C2 | 1049:5G 2A 64 15 G3 2B CA FO C4 | 1279:2D AG 44 G4 84 14 9B BC 77 
GE21:38 8G FG DG Bl 4C DF GE 31/1051:A9 3E 38 C6 14 44 34 84 E6 | 1281:12 88 3E Gl OB G3 20 BA G8 
GE29:55 94 85 1C 64 C2 30 55 6B | 1059:F5 AD B9 13 YE 13 G5 Gl 94 | 1289:66 G4 79 25 26 8B 25 94 6E 
GE31:CE 8G G8 39 14 D4 £8 14 43 | 1661:51 Bl Fl 57 54 88 CC 9G 39 | 1291:AE AF 25 AC AB AE 10 8D 2E 
GE39:24 34 42 AO 16 B6 G4 11 FB | 1069:90 G6 G3 41 4C 49 12 60 D3 | 1299:66 AG 2B 4C 8G 15 BI SC BC 
0£41:18 04 @G 8C DG G8 G3 10 EF | 1071:26 73 GA 14 FC 64 GA C8 57 | 12A1:2C F@ 13 AD 7C GG FO 5B 88 
G£49:94 @5 22 86 B9 GD 71 89 GC | 1679:AE G7 2B 57 2F 96 F4 FO 24 | 12A9:81 1C DA AD 7D 2D CD SC 64 
GE51:63 G1 20 36 F8 BC E6 AY 36 | 1G81:F2 66 C2 4A C4 71 4F 88 3B | 12B1:2B 6G 27 11 17 15 56 CC DB 
GE59:9E 5C 47 86 43 4C GB GF 9D | 1689:83 6@ BO GG 85 CC AE 41 7F | 12B9:62 GF 35 1F 9D G1 3C 53 F7 
GB61:AD 26 C9 9E G2 3D 18 88 BE | 1091:2B AC 74 89 83 60 8A FB B7 | 12C1:37 54 66 98 G5 6B 8C 5A F4 
GE69:04 A4 49 GG 4c 4A GF 40 C3 | 1099:C9 8G 90 68 32 1B 91 FB 74 | 12C9:81 2C 18 FG AG 36 Al GO EC 
G6E71:B5 63 BG G3 B5 CG 18 82 D2|1GA1:BO 48 G8 18 74 58 DO 1A 4F | 12D1:A2 32 76 66 59 8G GC DB 9D 
GE79:G1 @8 Cl 8C DF 28 41 7E B9| 1GA9:A5 98 FG 16 29 46 C9 4G SE | 12D9:67 AS GS AB 56 28 6C 58 FB 
@E81:8E C3 GE D4 EG GG 88 86 83 | 16B1l:FG@ 16 AG 1C BY GBA 29 54 CH | 12E1:05 4E 18 85 38 A4 G5 18 ED 
GE89:39 DC 77 GF 69 G6 8D CH 95 | 16B9:F5 98 C2 11 AG 4C 18 45 BE | 12£9:B9 BO 31 E3 CF 46 65 FO GE 
G@E91:1C 46 3D 98 17 AO OD 39 AF | 16C1:OF Fl 90 5C 50 G2 30 AD 49 | 12F1:DC DE 4D C6 C6 CA 8E 6C 3D 
GE99:B8 C5 99 AE D4 G2 EE G6 34 | 16C9:98 76 60 GA GE 18 26 G2 D5 | 12F9:80 58 15 68 OB C7 AD 52 6A 
GEA1:7B 26 GE 58 1B 26 34 GD 99 | 16D1:86 CG 26 FG G4 C8 4C C6 9B | 13G1:C9 23 FO CG G2 22 G6 88 2C 
GEA9:F@ 16 B6 78 Al 36 GB 8F AD | 1¢D9:12 83 F@ CE G3 71 AD BS EG | 1369:B9 GG 61 19 CO 4C FD 92 SF 
GEB1:DA 63 4C 16 7C 4B 1F 22 58/ 16E1:40 19 26 Bl 36 D@ BC 67 FB | 1311:0D 60 A4 G9 34 84 G1 AD SE 
GEB9:94 Al 34 8E 8F GA 4C C9 FE | 16£9:91 32 93 6G G1 4C GF 13 42 | 1319:46 GA CB G6 4C 86 G2 EG BE 
GEC1:GE FO 13 94 FF 65 69 BD BG | 16F1:AD 51 AB 15 BA C6 GB 35 57 | 1321:6C 16 24 40 3E 24 64 84 2B 
GEC9:94 2E E3 8@ 4C D8 GF BD El | 1GF9:DG 12 AD 52 2D C9 36 D® AZ | 1329:96 AD 13 5A 42 66 C3 18 F7 
GED1:29 5C 3C 66 36 29 A4 39 DB| 1101:6B C7 59 62 G4 C3 4C 38 ES | 1331:26 G8 68 CO SE 3E 9E 85 30 
GED9:G1 2D G5 36 1D AE BE 5B El/1109:96 6A 85 C7 8D 17 G3 8A 97 |1339:15 4C CF D8 96 E2 BG 59 7F 
GEE1:CA G4 48 D@ CC BC 94 22 1F/1111:65 E8 63 83 1E AG D7 43 EE | 1341:DD 90 85 E2 6B G3 47 AD FC 
GEE9:9C 96 C2 DF 20 A3 GB FO 65/1119:89 DG AO 51 AG 8B 83 76 2F | 1349:4C 74 16 AD AB 4G 77 G9 65, 
QEF1:17 Cl C6 49 C9 FF 28 2A 46/|1121:86 86 42 86 96 71 1C 68 66 | 1351:3c G1 7C AB E2 F8 CD 96 77 
GEF9:G6 21 CD 22 1C 84 G6 CD F9 | 1129:90 63 2C 3C 36 21 D7 89 D3 | 1359:8F DG G4 AD GE DG G3 38 88 
GFG1:CD 8D D@ AS G6 ED O7 AD 81/ 1131:AA 53 91 GF 53 AB D1 58 D9 | 1361:E9 Gl 8A F3 15 57 EG G6 1B 
GFO9:BA 36 FO 27 D8 86 G7 G6 16 | 1139:54 CC F8 58 21 BD 98 29 B7 | 1369:5A 62 Dg 15 1D 46 AD 3c 42 
GF11:D6 1F AD BB GA 16 6G 87 G1/1141:66 AE 79 2D AG G2 GB DB 16 | 1371:18 85 3C 83 38 18 E2 AO 36 
GF19:82 BC El 3F 2B 36 86 06 05|1149:20 6A 1B GA A2 26 AG 29 32 | 1379:0G FG DE BO 63 87 11 B6 22 
@F21:A@ CA BO 72 2F 76 68 206 £4] 1151:4C 6C 13 8D 5A BC G3 E4 AG 1381:22 56 1E 88 2D 4¢C 18 17 7¢ 
OF29:F5 4F 5D 46 3B 04 AD BD 29/ 1159:05 84 4F 56 E3 CF CG 62 50 | 1389:38 1B GB 90 B2 ES 80 04 3B 
OF31:36 8F 75 86 El 5E 10 C5 76/| 1161:29 C8 E8 85 16 65 C5 G5 E4 | 1391:26 G4 1c 4C 4F 18 AD 5C AG 
GF39:3A CO C8 GE C7 8D C2 38 C8 | 1169:58 33 77 76 66 EG A4 68 E2 | 1399:06 BG Bl 61 G3 CB GG 62 E4 
GF41:68 4A 26 33 22 ED 3D 65 06/1171:6C 16 3D 6C 25 59 21 G5 12 | 13A1:34 Al 21 4C 56 SF Bl 19 D6 
GF49:2B F8 3C Cl 4C Fl 3D 96 14| 1179:2B 84 F5 99 32 16 G4 1B 9F | 13A9:AD 64 19 86 GA AA BE A7 AA 
GF51:F1l AG Al DA FO F8 1E D8 F2/ 1181:F5 17 1E 23 G2 BC 2G GG DA | 13B1:7D 28 A6 GA 4C EE 16 D8 39 
GF59:4C BB 1G 47 35 E2 11 2A 84| 1189:66 21 86 7B 2D 20 AE 84 8A | 1339:91 GA 9D 93 31 4C 98 16 1A 
GF61:21 14 15 87 GE 14 4E C6 54| 1191:86 93 E2 GF 46 E@ AD 7A 81 | 13C1l:GC FE 19 86 43 DB 41 14 F8 
OF69:83 80 91 OB G2 GE 10 DE 93] 1199:2D D@ 47 AB 7D 88 47 D9 AG | 13C9:E8 16 AA CD OG G7 AE DC 72 
GF71:08 42 Al 93 20 61 53 1C D1|11A1:86 CF 81 78 C9 C8 9E 4C AD | 13D1:31 E8 4C G4 17 26 E2 BA 9D 
GF79:68 FS 16 78 29 OE G8 42 A6| 11A9:18 14 GF A4 4C DD 14 A3 AE | 13D9:69 Gl 4C 12 17 AG C4 D7 3C 
GF81:56 1C C8 D5 A3 38 94 CD 32! 11B1:AB F@ CG GD 69 CE 10 G4 79 | 13E1:11 G6 9A 88 D3 1C 84 @7 OD 


G-28 COMPUTE’ MAY 1993 


13E93A6 
13F1:EC 
13F9:66 
1491:4D 
1409:E7 
1411:64 
1419:1¢ 
1421:31 
1429:E4 
1431:B6 
1439:E1 
1441:A9 
1449:2c 
1451:B4 
1459:8B 
1461:85 
1469:44 
1471:D3 
1479:96 
1481:FF 
1489:AL 
1491:B9 
1499:4F 
14A1:51 
1449363 
14B1:0C 
14B9:76 
14C1:B6 
14C9:2B 
14D1:23 
14D9:17 
14E1:AE 
14E9:9A 
14F1:E0 
14F9:A6 
1561:66 
1569:C8 
1511:cl 
1519:C8 
1521:0D 
1529:A9 
1531:61 
1539326 
1541:36 
1549:5B 
1551:E1 
1559:1D 
1561:AG 
1569:99 
1571:56 
1579:ED 
1581:E0 
1589:1D 
1591:8E 
1599:96 
15A1:FO 
15A9:8D 
15B1:B8 
15B9:GD 
15C1:18 
15C9:E8 
15D1:9A 
15D9:61 
15E1:8D 
1L5E9:A9 
15F1:20 
15F9:BO 
1661:88 
1689:4C 
1611:D6 


1619:A2 30 8D 7B 85 4C OB 
1621:C4 97 GG 44 AO A3 G9 
1629:G0E 36 85 FE A@ 13 BY 
1631:02 58 14 99 C8 65 76 
1639:85 F2 A@ OB A2 16 AD 
1641:26 5B 11 3C 2E 63 BY 
1649:A@ C2 GB 84 2A Al 4E 
1651:95 37 87 5C A9 9E G5 
1659:BC 28 BO 22 A7 7E GO 
1661:7A FC GG 44 D3 1A 69 
1669:14 91 G1 47 86 11 49 
1671:3F E4 38 80 21 68 G8 
1679:81 DC AA 37 38 38 CO 
1681:02 38 GE E4 1A 28 C2 
1689:83 4C 98 87 91 C9 OF 
1691:B6 E9 50 88 83 C3 G6 
1699:F@ A7 26 7F GA 1B GF 
16A1:4C 82 1A AG GC A2 18 
16A9:BF 63 AQ 26 D4 CD 81 
16B1:3E 18 29 606 26 2F 25 
16B9:39 17 C@ Dl 6B 7B CO 
16C1:84 C9 26 FG 53 C9 36 
16C9:57 C9 3A BB 53 CO OG 
16D1:38 76 7A 64 62 83 G2 
16D9:6A C8 G6 51 16 C7 45 
16E1:062 SC 68 D9 11 G3 2B 
16E9:DF 5C 82 28 GE 19 67 
16F1:89 B9 56 2B 38 E9 30 
16F9:18 8A 6D 30 2E G0 1A 
1781:6B C8 C@ 63 D@ Al DF 
1769:64 @@ 8E 46 9E A4 99 
1711:62 88 D@ FA A2 68 BD 
1719:25 99 DD 62 38 47 68 
1721:E6 74 F2 A9 GB 8D FB 
1729:B3 FB 41 A9 87 2B 88 
1731:EC 16 68 46 66 1B DO 
1739:2F 8D BB AQ 23 40 4F 
1741:71 AG BF 43 46 47 85 
1749:4F 3A 8G E8 98 AC E7 
1751:65 8@ 1C 32 2B C@ 21 
1759:E7 C@ 15 FO B7 88 8C 
1761:35 6G D4 88 El 35 26 
1769:26 62 E2 66 C4 G1 8D 
1771:D@ 98 8D 10 DG BD FO 
1779:60 18 6D 08 A7 G7 DB 
1781:1A 69 76 3C C4 @1 55 
1789:65 1C 12 @C 98 3E G2 
1791:64 CO 66 Gl 66 69 G2 
1799:36 1E AA Gl E6 1B 4C 
17A1:12 96 G2 CO 46 CB 34 
17A9:04 64 E6 GG D7 Cl 20 
17B1:1B 81 D@ 63 26 BY 1B 
17B9:12 85 C7 20 54 28 AY 
17C1:15 1E 7B 20 DA G6 58 
17C9:50 88 86 E8 66 99 B6 
17D1:99 @D 12 35 16 97 5D 
17D9:C8 CO GE DG F2 EG 2E 
17E1:BA 99 F7 64 99 BF G5 
17E9:0F 8A GB AF G6 99 FF 
17F1:98 18 69 28 A8 18 17 
17F9:E6 30 5C @@ 62 Al 9B 
1891:88 98 67 21 Al 67 21 
1899:9E 85 GC 93 BD 79 16 
1811:72 16 E2 OF 24 6E GA 
1819:B2 76 88 62 A7 63 A7 


1A 
1D 
E8 
Al 
23 
36 
23 
A2 
OA 
89 
38 
AD 
8G 
86 
FO 
47 
GE 
co 
88 
26 
28 
96 
FO 
76 
AD 
6D 
2E 
AA 
09 
94 
BF 
CB 
EG 
97 
4G 
ag 
Da 
74 
co 
AC 
86 
G6 
6G 
2c 
66 
oc 
11 
99 
64 
73 
ce 
ES 
AG 
gc 
86 
04 
96 
99 
86 
31 
59 
OA 
AC 
i) 
1E 


95 
E4 
B6 
6D 
35 
5B 
B7 
F8 
65 
FO 
cg 
4c 
6A 
42 
8F 
A4 
6D 
BD 
17 
54 
6D 
68 
F4 
DB 
2A 
8c 
Dc 
43 
34 
98 
89 
88 
EB 
5D 
29 
F6 
FD 
45 
54 


2c | 


51 
F6 
cg 
6C 
B6 
72 
47 
F3 
76 
4A 
JE 
1c 
64 
OF 
41 
Gl 
E8 
82 
3B 
27 
5D 
6D 
cB 
cs 
AQ 


1841:AG 14 C3 3C 86 GD 87 


79 


c3 


1849:86 
1851:86 
1859:11 
1861:FB 
1869:24 
1871:1D 
1879:FG 
1881:1A 
1889:EC 
1891:F8 
1899:61 
18A1:62 
18A9:B5 
18B1:C8 
18B93AC 
18C1:Bl 
18C9:4C 
18D1:62 
18D9:60 
18E1:1D 
18E9:9D 
18F1:3D 
18F9:16 
1991:B3 
1969:75 
1911:D4 
1919:22 
1921:CE 
1929:C4 
1931:3C 
1939:68 
1941:82 
1949:A9 
1951:E1 
1959:41 
1961:1B 
1969:39 
1971:F4 


| 1979:A6 


1981:1B 
1989:5F 
1991:42 
1999:17 
19A1:56 
19A9:5F 
19B1:35 
19B9:4C 
19C1:1C 
19C9:76 
19D1:FC 
19D9:AE 
19E1:61 
19E9:2B 
19F1:E6 
19F9:Cl 
1A61:18 
1AG9:AA 
1Al11:11 
1A19:1B 
1A21:67 
1A29:88 
1A31:41 
1A39:91 
1A41:64 
1A49:C8 
1A51:47 
1A59:21 
1A61:28 
1A69:49 
1A71:CC 


4F 
2B 
32 
98 
52 
co 
34 
06 
F2 
42 
EO 
07 
2A 
FD 
40 
56 
1D 
2B 
65 
7c 
1D 
9D 
44 
44 
cg 
cs 
BB 
1c 
65 
F9 
69 
77 
@5 
oo 
3B 
6c 
1B 
3B 
87 
ag 
47 
42 
4F 
06 
8E 
1B 
1c 
i) 
AQ 
co 
28 
c8 
D8 
71 
95 
12 
cg 
27 
96 
62 
93 
53 
59 
99 
ial 
95 
2D 
39 
E3 
59 


Gl 
A2 
AD 
7 
cD 
De 
96 
1c 
4A 
40 
FO 
c8 
1c 
ol 
11 
63 
cs 
E9 
Dl 
51 
92 
34 
3B 
2c 
44 
4E 
91 
Bo 
Fl 
27 
Ag 
1D 
cD 
19 
5D 
09 
a6 
32) 
1D 
C4 
FO 
FO 
06 
53 
1F 
GE 
27 
81 
cB 
9D 
A2 
FO 
3D 
c2 
gl 
72 
De 
4c 
26 
53 
6c 
co 
62 
DA 
73 
91 
68 
21 
Bl 
D8 


G6 
96 
Da 
FF 
Urs) 
61 
B6 
92 
9A 
9c 
43 
9D 
AG 
45 
EG 
06 
GE 
26 
71 
1D 
OD 
10 
44 
BE 
64 
29 
57 
E8 
cD 
79 
64 
DS 
A2 
62 
36 
1B 
39 
c2 
3c 
Si 
65 
cs 
5F 
4E 
1c 
4c 
77 
1E 
3D 
Go 
23 
3D 
2B 
G1 
GA 
12 
06 
c7 
3c 
G2 
63 
4c 
48 
99 
6c 
96 
DD 
22 
1F 
28 


MAY 1993 COMPUTE 


PROGRAMS 


1A79:19 8E 39 13 C@ 91 8E GA AQ9|1CA9:71 8D G7 F5 12 CB FB G5 CB 
1A81:A9 85 69 28 D@ 26 AC 23 13 | 1cB1:09 48 A3 90 84 14 1c 26 C6 
1A89:AD 2C 26 7C 1A 8D 92 31 c8|1CB9:F5 1B FD ED 93 GC 4E C9 85 
1A91:8D 27 DG 26 C3 40 3E GG GE| 1CC1:FF 16 64 GB 60 8D 55 20 82 
1A99:AF G1 E2 23 23 A8 EG B9 AB | 1CC9:33 46 FB 19 16 17 AG GC 17 
1AA1:16 9F 82 B9 43 76 GA GE C7 | 1CD1:66 11 67 46 98 8E 46 16 62 
1AA9:B9 11 99 11 GE F8 A8 B9 A2| 1CD9:DG F4 9E 16 9E 1C GG G3 55 
1AB1:7E 2D CF A3 B9 46 2E DB C3 | 1CE1:80 26 DE 23 DB A9 AG 91 CB 
1AB9:B9 GE A8 GA GG B9 D6 2F C7 | 1CE9:FB AD 91 31 91 FD C8 CG A7 
1AC1:C3 2A E6 E3 60 AG C7 14 AG | 1CF1:78 DG F2 68 18 AS FC 69 B9 
1AC9:99 54 G4 99 18 53 G1 EG £9 | 1CF9:D4 D@ 8E AS FB 85 FD 80 6F | 1F29:30 97 33 6F 34 97 37 B4 35 
1AD1:05 99 A8 G6 88 8E G7 5F 5G | 1DG1:ED BG 94 1B E3 G1 BO FG 97 | 1F31:30 E2 65 G5 44 G6 46 G4 EF 
1AD9:08 81 GA DG 8G G1 G8 Gl D5 |1DG9:G8 91 GB DG Cl 91 91 5D 8D | 1F39:07 44 G8 65 86 1C 4 5 57 
1AE1:86 1B 16 F2 Gl GC 8A EG 7c | 1D11:70 6C 58 GG 47 85 EB 4F 1A | 1F41:46 64 G6 44 87 40 64 G8 EE 
1AE9:41 AA AG @@ 8E CF 16 8C E9 | 1D19:44 G6 45 EC G3 65 GA 22 52 | 1F49:10 GA 64 50 35 40 G4 G6 CE 
1AF1:84 BD 41 24 AE 7C 2D E8 EC | 1D21:G9 19 A4 AG 96 26 7D 12 D6 | 1F51:44 G7 40 G4 G8 1B GA CD 4A 
1AF9:AC 7D 2D C8 C@ G5 DG £8 BA | 1D29:AE 39 CA 8E 4G 2B 86 21 Ic | 1F59:D@ 48 40 FG G9 3G SA 86 67 
1B@1:68 AD 31 36 BA 45 AD 9E 41 | 1D31:G8 C2 GO 90 83 GU 42 GA D3 | 1F61:00 CE 41 4D G1 21 C6 49 B3 
1B69:36 GA A8 C8 B6 BE 93 31 84 | 1D39:Al 22 C2 44 42 E6 C7 C9 768 
1B11:A6 Gl 17 CF G2 AD 35 29 15 | 1D41:88 A2 C7 22 52 D4 37 G8 DF 
1B19:8E AG 66 2B 12 EG BB EG £9 | 1D49:49 84 SA 43 40 G8 AD BS F6 
1B21:GA B@ 63 94 60 AE 8D 62 GD |1D51:EC 26 A9 BD AG 28 26 1E IF 
1B29:2E BF 62 9A 84 38 DG 3c 33 | 1D59:AB GE 2E 3D 23 26 BE 24 61 
1B31:C9 67 D@ G6 EG 1D EE 3A 1C | 1D61:AF D8 15 D@ 55 59 B7 48 21 
1B39:D6 3E 61 4F GF C9 GF DG 17 | 1D69:1E 89 41 C9 11 BG 17 AD G1 
1841:0F B9 62 24 A2 94 GF AA 2c | 1D71:CB @0 DE AA 26 80 1D AD 93 
1B49:A9 81 C9 1E 8A AA 29 G1 22 | 1D79:G@1 2B 8D 3A 2B A5 C5 C9 99 
1B51:FG6 1B A@ 89 G2 FG 1c BC G4 | 1D81:61 FO FA 4D EF 26 A9 1D 1D 
1859:08 FG GB 8A 29 G4 DG 1E F2 | 1D89:20 99 23 AF E9 7F 8D GD OF 
1B61:46 78 41 C6 27 14 G2 E4 DC | 1D91:DC AQ FF 8D GO DC 88 87 89 
1B69:14 63 EC 68 FF CB G4 87 4D | 1D99:C4 14 13 12 8D CF 28 B7 62 
1B71:FG G8 20 49 GA 38 24 60 34 | 1DA1:22 83 65 Bl FD 11 88 91 5C 
1B79:11 3C 48 G6 GA 78 98 GG A3 | 1DA9:FB C8 CC G2 2B DO F3 28 7A 
1B81:03 4C A2 21 76 FA @9 G4 38 | 1DB1:F1 85 GF 78 16 2E GA 7C AQ 
1B89:AE DB 31 AC DC 31 26 BA A5 | 1DB9:16 EA 84 FD A9 1E AG 5D 8E 
1B91:FF FO B8 61 86 BD 41 C@ 6F | 1DC1:D1l 24 AG 85 16 9C 85 GB 93 
1B99:10 04 30 G4 39 61 CC FF 86 |1DC9:11 9F 85 85 FE A9 25 86 EC 
1BA1:606 AA BC 2C 2A BD 39 2A Fl | 1DD1:FD A2 @8 20 5B 11 3A 39 83 
1BA9:AA 26 E7 88 G3 A4 96 DG EG | 1DD9:20 AG GB 99 C4 30 CB CO IF | 2909:45 58 9E C6 86 G9 34 56 59 
1BB1:05 88 CA D@ F5 C8 EE 11 B4 | 1DE1:CA DG F8 G3 72 12 AG 8D AF | 2911:49 C7 46 24 86 20 89 GB BA 
1BB9:2E AD 26 G7 38 ED 64 A8 Dl | 1DE9:13 13 14 95 8D 15 @5 DB EG 
1BC1:8C 4@ 12 DG GA 26 AC 14 DB | 1DF1:GC AG A2 G6 AG 23 CB 41 63 
1BC9:B9 C4 36 26 DA 18 20 D2 6G | 1DF9:GA ES 72 AE 69 22 28 CD CD 
AC 41 2B 66 G4 C8 3G 13 | 1E@1:BD CC 85 C7 87 78 8A A6 56 | 2631:B9 BC 16 57 25 D3 43 SE 26 
61 32 C9 26 45 14 C9 FC | 1EG9:F4 9C AG 7B 2D DG G4 2G 48 | 2039:AC EG GD 41 2F 1E AG 45 36 
BG Gl 71 1B 66 C8 41 EG | 1£11:66 ED 61 26 7D 13 G3 CA 27 | 2041:45 44 26 91 41 57 22 63 Cl 
1E19:18 69 B2 C9 46 69 68 52 79 
6 38 E9 86 4C 80 46 82 | 1B21:32 5C AG FG GB C9 G2 BO E4 
AD 6C @8 GA 18 6D 8E 9F | 1E£29:GA 84 4B C9 F5 BG G3 CA D4 
69 CF AA C8 D@ FD E8 3F | 1E31:69 10 28 1A Gl 84 AG AS Al 
@B 6G 98 93 61 G4 G3 11 | 1E39:GF 26 C3 FF 26 98 12 60 65 
1C11:£6 G6 FG 11 81 4D 1B CA 2B | 1E41:A9 G@ 8D E5 GE A9 Gl 8D G9 
1€19:4C BE 22 9B 18 FB F5 78 6A | 1649:36 60 AD 5B 68 G5 7C 2D 61 
1C21:A9 20 13 45 F3 3C 14 EB 91 | 1E51:AD 5C 2B 8D 7D.2D 66 GE 29 
1029:39 75 62 23 20 31 23 Bl 8B | 1£59:48 93 96 FC F8 F8 FC DE D2 
1C31:FD C@ Dl Gl CG GA DG F7 AA | 1E61:8F D8 B5 18 2G 2F 23 44 1c 
1039:28 1¢ 23 DO EF 66 8C 24 35 | 169:20 5F 23 76 26 87 23 G8 66 
1C41:8F 81 35 96 87 9E 2B A6 @5 | 1E71:2C SF 2F 98 36 4B 33 G8 1F 
1C49:A7 60 FB 69 28 BG 14 38 E7 | 1E79:34 SF 37 08 40 9B 43 G8 GE 
1C51:2E 18 FC 64 FD 69 GA D8 69 | 1F81:44 9B 47 B68 48 5F 4B G8 BE 
1059:48 AS FE 69 G6 5@ G4 C8 A7 | 1E89:4C 5F 4F 68 50 4B 53 G5 89 
1C61:E8 EG G9 60 8E DB 6E AC DA | 1E91:58 73 5B 85 5C 73 SF 85 G7 
1C69:El 04 C8 69 A9 D3 85 FB 56 | 1E99:66 73 63 G5 64 27 67 G5 33 
1C71:A9 25 85 FC A9 27 C9 3F 65 | 1EA1:68 27 6B 7B 48 8F 4B 7B 93 | 29p1:50 AG 81 45 AS 98 2F CO BE 
1C79:A9 26 E9 6G 52 B6 BG 3C FC | 1EA9:2C 9B 2F 7B 34 9F 37 7B 8A | 29D9:3B 88 D2 45 41 44 59 OG 56 
1C81:F@ FA AD @@ AC 41 F3 GE 67 | 1EB1:3C 9B 3F 7B 50 8F 53 03 FC | 2661:Bl 7E 41 56 15 4C 2C 4G 9A 
1C89:DC 29 16 F@ EC 93 7A GG 36 | 1EB9:54 Fl 34 93 10 07 63 1B 90 | 2969:9B 3c C6 94 9G CD C9 C4 3D 
1091:38 58 GG 04 4B 41 13 A9 7F | 1EC1:66 6 CO GB G7 24 G8 42 66 | 2GF1:47 50 48 GG 41 46 47 CC 71 
1099:1D A2 64 20 C8 1B CA DG A4 | 1EC9:10 OB 44 GC G1 25 GD GO DG | 20F9:73 92 C3 D4 DO 47 D3 D4 CG 
1CA1:FA A9 @5 8D 3E 2B 2@ FA 15| 1ED1:05 GE G1 16 GF G1 11 11 45 | 2191:cl 60 G4 DA C9 DG 46 DG 59 


G-30 COMPUTE MAY 1993 


SPODNRQRVQWBQWUHNNARUORNNA 
w 
ro) 
rc) 
r) 
is] 
a 
is] 
) 
a 
re) 
a 
ro] 
o 
rs 
1) 
rs 


SPIYASAey 
a 
i) 
aQ 
© 
2 
a 
wo 
a 
a 
cs 
i 
© 
a 
wo 
wo 
i} 


QYPENWARQRWVADANBUNW 
a 
cS) 
© 
Qa 
wt 
> 
uw 
ray 
=} 
wo 
Q 
e 
o 
© 
wo 
> 


2169:C8 CE 66 94 19 69 CF D4 ll 
2111:55 42 41 31 20 64 C9 CE 3D 
2119332 3E 3C 23 23 23 3E C4 A4 
2121:93 26 26 20 12 DO 94 G4 F3 
2129348 6C CF C4 45 56 49 78 7B 
2131:CE 15 69 96 39 BG E7 78 16 
2139:43 95 65 44 41 52 59 DC 56 
2141:44 44 52 B2 4C D8 67 73 73 
2149:66 19 G1 68 32 G2 9A 81 CB 
2151:63 26 E4 C2 65 A7 2C 46 C6 
2159:06 G6 A4 28 OD 26 G7 GG AD 
2161:13 8A 83 3A 16 32 3C C8 9E 
2169:66 26 23 6G 62 BE C4 B3 CD 
2171:4F 79 5@ 41 43 45 26 Cl 69 
2179:56 41 12 CE 41 42 43 39 39 
2181:80 3A 4D 4C 2E 53 AG 36 37 
2189:086 53 2C 57 OG GE 18 27 2B 
2191:45 63 72 81 8B 9F B3 C7 BF 
2199:C8 C9 D6 GB OF 1E 1E OF 7A 
21A1:G0F GA 14 14 14 61 61 12 6A 
21A9:C9 4E 49 AG C7 41 4C 49 BC 
21B1:5A E@ 54 C6 49 4C 45 53 AQ 
21B9:EE 13 04 6D 58 55 56 DG 19 
21C1:42 3C C4 5C 56 AG G5 1l £2 
2109319 1B 14 21 CF 5@ SE 26 51 
21D1:41 @2 4F 4E 46 11 @D OD Al 
21D9:12 1D 1D 1D C7 45 54 26 FD 
21E1:D3 54 52 CC 9D 2D 72 2A EA 
21E9:CE 55 4D 42 45 52 78 46 61 
21F1:46 82 EA 26 3D 28 9B C8 Cl 
21F9:18 D4 C9 CE D5 C5 3E AG 82 
2201:3C Cl C2 CF D2 51 9E 91 D3 
2269:3C C3 D5 D2 D2 C5 CE Cl 51 
2211:1D 26 3C C2 Cl D3 C5 C4 4D 
2219:26 CF CE 26 C7 C5 D4 3E 7A 
2221:06 12 D3 AC 27 54 49 4E 9A 
2229:47 26 D2 45 43 4F 52 44 48 
2231:53 G6 36 8G BG BB GB GB 25 


Maurice Yanney, the author of Balloon 
Pop (August 1992) and Cats and Mice 
(January 1993), lives in Lebanon, Penn- 
sylvania. 


UTILITY PLUS 


By Eric Jevon Bryant 

Utility Plus is a group of three useful util- 
ity programs for the 64 written in ma- 
chine language to take advantage of 
the language's power and speed. The 
first utility, Word Wrapper, wraps text 
around the screen when words become 
cut off by the screen border. Integer Ar- 
ray Search lets you quickly search 
through an array of integers for a spe- 
cific value, and String Array Search 
searches through an array of strings for 
a specific string of characters. 

The utilities in the Utility Plus package 
can be used separately or together. 
They were programmed independent- 
ly. Also, they reside at 52376-53247, 
which is near the top of free RAM, so 
it may be possible to run other machine 


language programs with these in 
place. If you use all three programs, 
this leaves you with 3227 bytes of free 
RAM, a little more than 3K. 

Originally, Utility Plus was written to 
complement a text adventure | had writ- 
ten. The majority of the program was in 
BASIC, and the utilities were created to 
speed up the parsing of commands 
and outputting text to the screen. Utility 
Plus's usefulness, however, is not restrict- 
ed to text adventures. You may use the 
package in just about anything from da- 
tabases to your own word processor. 


Entering Utility Plus 

Utility Plus is written entirely in machine 
language. To enter it, use MLX, our ma- 
chine language entry program; see 


. Typing Aids” elsewhere in this sec- 


tion. When MLX prompts, respond 
with the following starting and ending 
addresses if you want to have all three 
utilities. 


Starting address: CC98 
Ending address: CFFF 


Note that Utility Plus is a package of 
three utilities that are independent of 
each other. This means that you may 
wish to type in only the ones that you 
need. If you want only one or two of 
them, use the addresses listed below 
and enter only those lines of the MLX 
listing. 


Word Wrapper 
Starting Address: CC98 
Ending Address: CDFB 


Integer Array Search 
Starting Address: CDFC 
Ending Address: CEE4 


String Array Search 
Starting Address: CEES 
Ending Address: CFFF 


Be sure to save a copy of the program 
before exiting MLX. When you're ready 
to use the program, load it with the ,8,1 
extension, type NEW and then start to 
work on your own BASIC programs. 
You'll find Utility Plus helpful in many 
programming situations. 


Word Wrapper 
If you've ever used the PRINT state- 


ment in a program to print out instruc- 
tions or other information, you know 
how difficult it can be to make the 
words wrap properly. It usually takes a 
good deal of trial and error to make the 
statement print correctly. Word Wrap- 
per does the work for you. 

To use this utility, place the text you 
wish printed to the screen in the string 
variable A$. (Failure to do this could re- 
sult in the computer's locking up). 
Type SYS 52376,0 and the text con- 
tained in variable A$ will be printed. 
Any words that might have been cut off 
by the edge of the screen will be 
wrapped around. If you type SYS 
52376, 1 the words will print, but the pro- 
gram will automatically add a prompt 
that tells you to press Return to contin- 
ue. Note that you may print something 
beforehand with a semicolon and then 
invoke Word Wrapper, and it will con- 
tinue from that PRINT statement, wrap- 
ping accordingly. 

Word Wrapper is quite powerful. Af- 
ter Word Wrapper has printed some- 
thing onscreen, anything that is printed 
afterward will be tacked onto the end 
of the string, as if you used PRINT 
with a semicolon. To avoid this, simply 
print after you execute Word Wrapper. 


Integer Array Search 

An integer is any number that does not 
contain a fraction. On the 64, an inte- 
ger must fall within the range of from 
32767 to -32767. In Commodore BA- 
SIC, an integer is recognized as a var- 
iable name following by a percent 
sign, A% or BC%, for example. 

Integer Search can look through any 
array of integers that contains no 
more than 255 elements. (t's better if 
your arrays have no more than 254 ele- 
ments since a 255 is a null value for In- 
teger Search.) 

To invoke the Integer Array Search, 
type the statement SYS 52732,XY%, 
NUM,Z. In this statement, XY% is the in- 
teger array to search through (the per- 
cent sign is needed), NUM is the num- 
ber to search for, and Z is the initial 
value in memory location 251. Index Ar- 
ray Search will retrieve the index held 
in 251 first and will start the search at 
the very next index. Therefore, it's a 
good idea to initialize your integer 
search by entering SYS 52732,XY%,0. 
This will place a O in 251 and start 


MAY 1993 COMPUTE G-31 


PROGRAMS 


your search at an index of 1. 

The array index that contains your val- 
ue NUM is held at memory location 
251; just enter PRINT PEEK(251) to 
find its value. A value of 255 means 
there was no match, while anything 
less indicates the index where there 
was a match. If the variable you en- 
tered for XY% does not exist, the pro- 
gram will return a SEARCHING ERROR 
message. 


String Array Search 

In BASIC, a string is any string of char- 
acters. String Array Search lets you 
search through any list (an array) of 
strings for a specific string or even a 
part of a string. 

Place the string you're searching for 
in string vatiable A$. This may even be 
the first few characters of the string. 
For example, JOH would locate 
JOHNS, JOHNSON, or JOHANSON, 
but not JIM JOHNSON. Failure to 
have something contained in A$ could 
result in the computer's crashing. 

With this done, enter SYS 
52965,AB$,X, with ABS being the 
string array to search (the $ is neces- 
sary) and X being the initial value for 
252. Once again, if string ABS does 
not exist, you'll receive a SEARCHING 
ERROR message. This time, however, 
the matched index will be stored in 
memory location 252, so it will not con- 
flict with the Integer Array Search. A 
255 in this location indicates that a 
match was not found. 


Utility Demo 

This demonstration program gives you 
an example of the Utility Plus features 
and how to use their functions. Program- 
mers may find that dissecting the 
code is helpful. Since Utility Demo is 
written entirely in BASIC, enter it with 
The Automatic Proofreader to help elim- 
inate typing errors. Be sure to save the 
program before running it. 

Simply run the demonstration with 
Utility Plus already in memory and 
watch as it demonstrates the integer 
and string searches, saving the Word 
Wrapper for the finale. 

The program sets arrays T%() and 
R%() for integer arrays and S$() 
for a string array. The demo illustrates 
the Integer Search by picking ten ran- 
dom numbers between 0-254 and 


G-32. COMPUTE MAY 1993 


then searching for these values in ar- 
rays T%() and IR%(). T%() has a max- 
imum of 100 elements, so some of the 
random numbers will not be found if 
they exceed 100. Also, the values in 
T%() are equal to 100 minus the in- 
dex, while in IR%() there is a direct 
relationship. Thus, the value 37 is held 
in index 73 in T%() and 37 in IR%(). 
Use this to check the searches. 

The second demo deals with the 
string S$(). This array contains the 
word TRASH in 234 of its 254 elements 
and the word TREASURE is scattered 
at random in 20 elements throughout 
the array. The numbers onscreen are 
the indexes of the elements that con- 
tain the word TREASURE. The variable 
LI$ contains this list. 

Finally, the word-wrap demo prints 
some text on the screen, prompts you 
to press Return, and continues with 
more text. 


Some Final Notes 

First, the Z in SYS 52732,XY%,Z (Inte- 
ger Search) and the X in SYS 
52965,AB$,X (String Search) are option- 
al; they may be left out. The utility will 
simply begin the search at the current 
index held in 251 for Integer Search or 
252 for String Search. 

Second, when searching for nega- 
tive values in the Integer Search, you 
must place this value in a variable and 
then enter SYS 52732,XY%, VAR with 
VAR being this variable. If you attempt 
to enter SYS 52732,XY%,-1 you will run 
into problems. 

Third, if your A$ variable contains a 
short string and you call Word Wrap- 
per, you may see some garbled text 
printed after your word. To clear this 
up, simply add CHR§(0) after your A$ 
text as in AS=A$+CHR&(0). This will 
add a null character to your string and 
stop the garbage. 

Finally, there is a programming trick 
that will allow you to set the left margin 
for Word Wrapper. Simply enter POKE 
52496, 256 — left margin. For example, 
if you wanted a left margin of 5, you 
would enter POKE 52496, 255 — 5, or 
POKE 52496, 251, There is also a way 
to set the right margin, but it isn't as sim- 
ple; those able to decode machine lan- 
guage may be able to solve it. Hint: 
fool around with locations 52460 and 
52496 combined. 


UTILITY PLUS 


CC98:A2 66 28 79 8G C9 2C DG 6F 
CCAG:83 24 G8 E2 86 Bl 4C 47 CC 
CCA8:CD 6G A5 D3 18 EY 27 BG 82 
CCBG:62 69 28 8D A9 CC A2 BG 49 
CCB8:AG 69 Bl A5 C9 GB DG G8 2B 
CCC@6:A5 Bl DG G1 66 4C AC CD 1F 
CCC8:26 D2 FF C9 26 DG G8 AI Cl 
CCDG:61 85 A3 A2 OG 86 A4 C9 18 
CCD8:@D D@ G5 A2 FF BE AY CC 52 
CCEG@:AG G1 28 8E CD EE A9 CC 42 
CCE8:AD A9 CC C9 28 F@ GC E6 FD 
CCFG:A5 A5 AS C9 OG DB BF E6 Cl 
CCF8:A6 D@ BB C6 A3 A2 GG EB 8E 
CDGG:A9 14 26 D2 FF E4 A3 DO 52 
CD@8:F6 CA AY 26 20 D2 FF EG 36 
CD16:96 D@ F6 AG G1 26 8E CD 3C 
CD18:A5 A5 E5 A3 85 A5 AS A6 9B 
CD26:E5 A4 85 A6 4C 2D CD C8 6E 
CD28:84 A3 4C AA CC A2 G3 E6 61 
CD36:A5 A5 AS C9 GB FO G8 CA F7 
CD38:E@ 6G FG G8 4C 2F CD E6 84 
CD4G:A6 4C 37 CD 4C AA CC AS 52 
CD48:2D 85 A3 A5 2E 85 A4 AG 1C 
CD56:60 Bl A3 C9 41 FB G6 C8 BC 
CD58:20 8E CD F@ F2 C8 Bl A3 32 
CD66:C9 8G DG F4 AG G3 26 8E 4A 
CD68:CD AZ 6G Bl A3 85 AS C8 75 
CD76:Bl A3 85 A6 C6 A3 A5 AZ 9C 
CD78:C9 FF D@ G2 C6 A4 AG GG 3D 
CD86:Bl A3 A8 AQ BB 91 AS AG BF 
CD88:01 85 A4 4C 27 CD E6 A3 41 
CD9G:A5 A3 C9 GB FO G6 88 CB 92 
CD98:60 DG F3 66 E6 A4 FG F6 BF 
CDAG:12 5B 52 45 54 55 52 4B A5 
CDA8:5D 92 AB GB BY AB CD 26 B7 
CDBG@:D2 FF C8 C@ 62 DG F5 AG BA 
CDB8:90 B9 A2 CD AE 18 D@ EG 4C 
CDCG:17 FG GA 26 D2 FF C8 CG 5G 
CDC8:96 D@ EE FG @5 18 69 8G 64 
CDDG:DB Fl AD 6G BO AB CD 2G 91 


CDD8:D2 FF C8 C@ 62 DO F5 AY EB 
CDE@:60 85 C6 A5 C6 FO FC AG AS 
CDE8:69 AG GG 84 Bl AO 14 29 71 
CDF@:D2 FF C8 C@ G8 D® F6 AY 36 


CE18:FF AE 20 83 AE 26 AA Bl 9A 
CE26:85 A6 84 A7 26 79 86 FG OD 
CE28:95 28 66 E2 86 FB A5 2F 1D 
CE36:85 AD A5 3@ 85 AE AG 6G DB 
CE38:Bl AD C5 A3 D@ 67 C8 Bl F2 


CE76:F8 AB 6G Bl AD 85 AA C9 76 
CE78:63 FO D6 AA CA 26 DB CE B6 
CE80:20 DB CE Bl AD 95 AF EG 1E 


CEBG:FB 98 63 86 FB 60 26 DB B6 


CEB8:CE 
CECG:FO 
CEC8:AC 
CEDG: 46 
CED8:85 


DB 
E6 
BG 
AB 
6a 
E6 
FD 
24 
73 
79 
FC 
2E 
41 
oo 
Bl 
26 
AG 
EG 
AS 
AG 
AS 
cs 
El 
co 
c8 
99 
FO 
AA 
EB 
Bl 
AG 
co 
AG 
1) 
c4 
AS 
85 
EB 
F4 
E6 
FC 


CFOG:AE 
CFO8:E2 
CF1O:AA 
CF18:AA 
CF2G6:AA 


CF2 


Cc C8 


CF30:E6 
CF38:EB 
CF46:95 
CF48:D0 


CF7@:A5 
CF78:FO 
CF86:DA 
CF88:CO 
CF9G:66 
CF98:AA 
CFAG:CF 
CFA8:E6 


CFDG@:E6 
CFD8:A9 
CFEG:AA 
CFE8:C8 
CFFG:G1 
CFF8:AA 


UTILITY DEMO 

HB 16 REM UTILITY/DEMO 

26 REM BY ERIC J. BRYANT 

30 REM COPYRIGHT 1993 - COM 
PUTE PUBLICATIONS - ALL 
{SPACE}RIGHTS RESERVED 
REM DIMENSIONING ARRAYS 
DIM T% (100) 

DIM IR$(254) 

DIM $$(254) 

REM 
REM 
REM 
FOR X=1T0100: T%(X)=160 
-X :NEXT 

FOR X=1T0254: IR%(X)=X 
{4 SPACES}:NEXT 

FOR X=1T0254:S$(X)="TRA 
SH": NEXT 
REM 

FOR X=1T026 
TRS (X) 2) 
Y=INT (RND(@)*254):1F S$ 
(Y)<>"TRASH" THEN 206 
S$ (Y) ="TREASURE-"+IX$:N 
EXT X 


De 
66 
E5 


49 

98 

169 
116 
126 
139 
146 
156 


BUILDING ARRAYS 


166 
176 


180 
196 2 IXS=MID$(S 
208 


216 


AD 


HE 


PM 


JK 
FH 


EF 


226 
2390 
246 
256 
268 


276 


280 


296 


300 
318 
326 
3398 
346 
356 
360 
376 


386 


398 
400 
416 
420 
430 
446 
456 


460 
476 


480 


496 


566 


516 


528 
538 


546 


REM 
REM DEMO 
REM INTEGER ARRAYS 
REM 
PRINTCHRS$ (147) ;CHRS$ (18) 
;"INTEGER ARRAY DEMO:" 
FOR X=1T016:Y=INT (RND(G 
)*254) :NUS=MIDS$ (STRS (Y) 
72) 
PRINTSPC (1) ;NUS;TAB(5); 
"(T%) {2 SPACES}"; 
SYS 52732,T%,Y,@:IF PEE 
K(251)=255 THEN PRINT"N 
OT FOUND":GOTO 319 
PRINT" LOCATION"; PEEK (25 
1 
PRINTTAB (5) 7" (IR) 
SYS 52732,IR%,Y,@ 
PRINT" LOCATION"; PEEK (25 
1) :NEXT X:GOSUB59B 
REM 
REM STRING ARRAYS 
REM 
PRINTCHRS (147) ;CHRS$ (18) 
;"STRING ARRAY DEMO:" 
PRINT" THE TEXT ";CHRS( 
34) ; "TREASURE-(X) ";CHRS 
(34);" IS LOCATED:":POK 
B252,0 
FOR X=1T026:1XS$=MID$(ST 
R$ (X) ,2) :AS="TREASURE" 
SYS 52965,S$,PEEK (252) 
VUS=MIDS (STR$ (PEEK (252) 
) ,2) :LN=LEN(VU$): ZES=" 
ooo" 
IF LN<3 THEN VUS=LEFTS ( 
ZE$,3-LN)+VUS 
PRINT" ";VUS;:LIS=LIS+V 
US+" ":NEXT X:GOSUB 599 
REM 
REM WORD WRAPPER 
REM 
PRINTCHRS$ (147) ;CHRS(18) 
7CHRS (14); "WORD WRAPPER 
DEMO:";CHRS(146);" "; 
AS="THIS IS A DEMO FOR 
{SPACE}THE WORD WRAPPIN 
G UTILITY! SEE HOW THE 
{SPACE}WORDS WERE " 
AS=AS$+"AUTOMATICALLY WR 
APPED AROUND THE HEADIN 
G? WORD WRAPPER KEEPS T 
RACK " 
AS=AS+"OF WHAT POSITION 
ON SCREEN YOU ENABLED 
{SPACE}THIS UTILITY, AL 
LOWING FOR " 
AS=AS$+"MUCH VERSITILITY 
" 
SYS 52376,1:PRINT:PRINT 
AS="ALSO NOTICE HOW WOR 
D WRAPPER JUST PROMPTED 
YOU TO PRESS [RETURN], 
" Sa 


"e 
7 


AS=AS+"THIS ALLOWS YOU 
{SPACE}TO PROMPT THE US 
ER BEFORE CONTINUING WI 


TH A RATHER " 


FQ 550 AS=AS+"LENGTHY TEXT." 

FF 560 SYS 52376:PRINT:PRINT:G 
OsuB 590: 

BP 570 PRINTCHRS (147) ;CHRS$ (142 
);"UTILITY/DEMO COMPLET 
Ee 

QM 580 END 

HX 596 PRINTCHRS (18) ; "CONTINUE 
?":PRINTCHRS (18) ;"(Y)ES 
OR (N)O" 

EJ 606 GET A$ :IF AS="" THEN 6 
1) 

DR 616 IF AS<>"N" THEN RETURN 

XQ 620 END 


Eric Jevon Bryant lives in the Bronx, 
New York City, NY. 


DIRECTOR-EASE 


By Randy J. Clemmons 
| have subscribed to Gazette since 1985, 
and | always look forward to reading Jim 
Butterfield's “Machine Language” col- 
umn. In October 1992, Jim wrote that pro- 
gramming to read a disk directory is no 
trivial task. | thought you might like to 
look at my solution for reading directories. 
Director-Ease (pun intended) makes it 
possible to create a directory reader eas- 
ily wherever 102 bytes of RAM are 
available. 

Director-Ease has an option to create 
a BASIC loader, which allows BASIC pro- 
grammers an easy path to incorporate a 
directory reader into their work. Also, if 
you wish, Director-Ease lets you display 
only specific file types, such as PRG, 
SEQ, REL, or USR files. 


Entering the Program 

Director-Ease is written entirely in BA- 
SIC. To help avoid typing errors, enter 
the program with The Automatic Proof- 
reader; see “Typing Aids” elsewhere in 
this section. Be sure to save a copy of 
the program before you try to run it. 


Using the Program 
Load and run Director-Ease. To use 
the program for the first time, use the 
default starting address of 828 which 
appears on screen. Location 828 is in 
the 64's cassette buffer, a favorite 
place for small machine language rou- 
tines. Respond to the make loader ques- 
tion with N for no. You'll then see a mes- 
sage onscreen that tells you to use 
SYS 828 to view files. Enter that SYS to 
verify that everything is working well. 
MAY 1993 COMPUTE G-33 


PROGRAMS 


Relocation 
Let's check out Director-Ease's relocat- 
ability feature. Enter RUN and repeat 
the steps outlined in the previous par- 
agraph, but this time pick an address 
in the 64's upper RAM. For example, en- 
ter a starting address between 49152 
and 57145, Remember, use a place 
where 102 bytes of RAM are available. 
You could choose a location inside 
BASIC’s normal program space, but 
you'd have to take steps to protect the 
code from being overwritten eventual- 
ly by BASIC. You could do it by mov- 
ing BASIC's top-of-memory pointer 
down and then entering a CLR state- 
ment to realign BASIC’s pointers. 
Then you could safely use an address 
above the top-of-memory pointer. 


Create a Loader 

To use the BASIC loader option, enter 
Y when the programs asks if you want 
to create one. When the program finish- 
es executing, several lines of BASIC 
code will appear onscreen. This code 
is ready to run, save, or renumber. 

It's easy to add this BASIC loader 
code to your programs by using an.ap- 
pend routine. If you don’t already 
have an append routine, see Randy Th- 
ompson's “Programmer's Page" in the 
September 1992 Gazette. 


What’s Happening 

As Director-Ease executes, the follow- 
ing events take place. The code is 
placed in 102 bytes of RAM and then 
a relocation routine makes adjustments 
to some machine language instructions 
(JMP and JSR) inside the code. When 
the make loader option is selected, the 
dynamic keyboard technique is em- 
ployed to create the data statements 
for BASIC and to delete Director-Ease 
from memory, leaving only the code for 
a BASIC program. 


Being Selective 

Reading either specific (PRG, SEQ, 
REL, USR) file types or all file types is 
easy with Director-Ease. The default for 
Director-Ease is to view all file types, 
but by entering a few POKEs, you can 
change the program to read specific 
file types only. Another default option is 
to view sequential files only. To switch 
to this default, enter POKE (starting ad- 
dress + 9),6. Then enter the SYS and 


G-34 COMPUTE MAY 1993 


starting address to view the directory. 
If there are no sequential files on the 
disk, only the disk header is printed. To 
switch back to viewing all files, enter 
POKE (starting address + 9),1. 

Before continuing, let's review the 
decimal equivalents for ASCII charac- 
ters PS, R, and U. The ASCII value for 
P (PRG) is 80, the value for R (REL) is 
82, the value for S (SEQ) is 83, and the 
value for U (USR) is 85. Here’s how 
those values can be used to select spe- 
cific file types for display. 


POKE (starting address + 99),80 
to view program (PRG) files only. 
POKE (starting address + 99),82 
to view relative (REL) files only. 
POKE (starting address + 99),83 
to view sequential (SEQ) files only. 
POKE (starting address + 99),85 
to view user (USR) files only. 


To enable the option to view specific 
file types, enter one of the above 
POKEs and then POKE (starting ad- 
dress + 9),6. Then use SYS to get to 
the starting address to see the directo- 
ry. To switch back to viewing all file 
types, enter POKE (starting address + 
9),1. 


Device Numbers 

Director-Ease also lets you see direc- 
tories on devices other than device 8. 
You can customize the program by en- 
tering the following three POKEs plus 
the device number of your drive or 
REU. (Note; The selective directory op- 
tion will not work with Commodore 
1700 series REUs. When used with 
these REUs, the option only lists direc- 
tories of all file types.) 


For directories on devices other than de- 
vice 8, you'll have to enter three 
POKEs, each ending with the desired 
device or drive number. Here are 
those POKEs. 


POKE (starting address + 1), device # 
POKE (starting address + 21), device # 
POKE (starting address + 89), device #. 


Now, when you check a directory by 
typing SYS starting address, you'll get 
a listing of programs and files on which- 
ever device or drive number that you 
selected in the above POKEs. 


DIRECTOR-EASE 
BM ® REM COPYRIGHT 1993 - COMP 
UTE PUBLICATIONS INTL LTD 
- ALL RIGHTS RESERVED 
GOTO1@:REM BY RANDY CLEMM 
ONS 
S=16{2 SPACES}:REM * DELE 
TE ROUTINE 2-8 * 
PRINT"{CLR}{2 DOWN}":FORI 
=S TO S+66 STEP19 
IFI>34@THEN NEXT: PRINT"GO 
TO7":GOTO6 
PRINTI: PRINTCHRS (20) :NEXT 
I:PRINT"S="S+66" {LEFT} :GO 
TO3" 
POKE198,10:FORK=1T016: POK 
E630+K,13:NEXTK: PRINT" 
{HOME}":END 
PRINT" {CLR} {2 DOWN}":FORM 
=1T08:PRINTM:NEXTM: PRINT" 
PRINT CHR$(147) :LIST" 
POKE198,9:FORK=1T09: POKE6 
30+K,13:NEXTK: PRINT" 
{HOME}":END 
PJ 10 GOSUB13G:INPUT"{CLR} 
{2 RIGHT}{2 DOWN}CREATE 
{SPACE}BASIC LOADER Y/N" 
7C$:IFCS$="Y"THENGOSUB110 
:GOTO 36 
PRINT"{2 RIGHT}{2 DOWN}S 
YS";S:PRINT"{2 RIGHT} 
- {2 DOWN}TO VIEW "TS" FIL 
ES":END 
PRINT" {CLR}{2 DOWN}":FOR 
I=STOS+47STEP6 
IFI>FTHENNEXT: PRINT" GOTO 
86":GoTO7¢ 
PRINTI;"DATA ";:FORJ=GTO 
5:RS=STR$ (PEEK (I+J)) :PRI 
NTRIGHTS (R$,LEN (R$) -1) ;" 
" 


mM 1 
sD 2 
JR 3 
FD 4 


HS 5 
GH 6 
XK 7 


SH 8 


KJ 20 


JH 39 
JI 46 


PK 50 


"5 
NEXTJ: PRINTCHR$ (26) :NEXT 
I:PRINT"S="S+48" {LEFT} :F 
="E"{LEFT}:GOTO 36" j 
POKE198,10:FORK=1T014: PO 
KE630+K,13:NEXTK: PRINT" 
{HOME }":END 

SA= (PEEK (679) *256) +PEEK ( 
686) :EA=SA+101 

PRINT" {CLR} {3 DOWN}"SA-1 
"FORI="SA"TO"EA": READDA: 
POKEI,DA:NEXTI:END" 

MF 160 PRINT" RUN 2":POKE198,2: 
POKE631,13:POKE632,13:P 
RINT" {HOME }":END 

REM **(3 SPACES}SAVE ST 
ARTING ADDRESS 

{3 SPACES}** 
TV5S:HB=INT (TV/256) :LB= 
INT (TV- (HB* 256) ) : POKE67 
9,HB:POKE680,LB: RETURN 
PRINT" {CLR} {3 RIGHT} 

{3 DOWN}ENTER STARTING 
{SPACE}ADDRESS NO, 

{3 SPACES}828" 
INPUT"{36 RIGHT} {UP}";s 
PRINT"{3 RIGHT}{2 DOWN} 


PJ 66 


BM 76 


GH 80 


DE 96 


EK 116 


MB 126 


SC 136 


DX 149 
DK 156 


POKING DATA TO MEMORY . 
" 


GG 160 REM * DIRECTORY ML DATA 
* 


XR 170 FOR I= S TO S+101:READD 
A:POKEI,DA:NEXTI:F=S+19 
1 

DATA 169,8,170,160,0,32 
1 186,255,169 

DATA 1,162,154,166,3,32 
1189,255,32 

DATA 192,255,162,8,32,1 
98,255,32 

DATA 228,255,32,228,255 
132,225,255 

DATA 246,49,32,228,255, 
32,228,255 

DATA 165,144,208,39,32, 
228,255,141 

DATA 166,3,32,228,255,1 
74,168,3,32 

DATA 265,189,169,32,32, 
210,255 

DATA 32,228,255,246,6,3 
2,216,255,76 

DATA 126,3,169,13,32,21 
@,255,76,91 

DATA 3,32,204,255,169,8 
732,195,255 

DATA 96,36,48,58,42,61, 
83,0, 

REM ** RELOCATION DATA 
{SPACE} ** 

DATA 94,11,13,190,50,51 
1100,56,57,66,75,76,31, 
83,84 

REM ** RELOCATION ROUTI 
NE kk 

FORI=1 TO 5:READ DA:TV= 
S+DA:HB=INT (TV/256) : LB= 
INT (TV-(HB* 256) ) 
READLO: POKE (S+LO) ,LB: RE 
ADHI: POKE (S+HI) ,HB:NEXT 
I:RETURN 


FC 186 


KS 196 
XS 206 
QJ 216 
HC 226 
AH 236 
PD 246 
MG 256 
JE 266 
DJ 276 
KJ 280 
FD 296 
DH 366 


QR 310 


RM 320 


EB 330 


SG 346 


Randy Clemmons wrote this program 
when he found himself needing to re- 
locate a directory reader to make 
room for other machine language 
code which required the same memo- 
ry. He lives in San Diego, California 


CROSSREF 128 


By Donald G. Klich 
Have you ever wanted to make modifica- 
tions to someone else's BASIC program 
but were afraid to touch it for fear of reus- 
ing a variable name or removing an in- 
struction that may be used as an entry 
point? Then you need CrossRef 128. 
CrossRef 128 will process any 64 or 
128 BASIC program and send an alpha- 
betical listing of all variables and all the 


lines that refer to them to your printer. It 
also prints a list of all entry-point line num- 
bers with their associated branching line 
numbers. 

With this listing, it's then possible to 
choose unused variable names or re- 
place original coding lines without the 
fear of accidentally queering the original 
program. 


Typing It In 
CrossRef 128 consists of two program 
segments, both written in BASIC 7.0. 
To help avoid typing errors, enter the 
programs with The Automatic Proofread- 
er; see “Typing Aids’ elsewhere in 
this section. Save the first segment 
with any name you wish, but be sure to 
save the second segment with the file- 
name SEG.2 since the first program 
loads the second by that name. Note 
that abbreviated commands (upper 
case characters) are used on line 20 of 
the first segment. This is necessary so 
that the required code will fit in the key- 
definition area. 


Creating a List 

Load and run the first short program, 
and make sure your printer is turned 
on. This program loads the f1 function 
key area, displays some instructions, 
and then exits. Now DLOAD the pro- 
gram to be cross-referenced. Finally, 
be sure that the disk containing SEG.2 
is in the drive and press the f1 key. 

The amount of execution time re- 
quired depends on the length and com- 
plexity of the target program. Large pro- 
grams may take 15 minutes or more to 
process. As a comfort, turn up the vol- 
ume on your monitor, and you should 
hear the churning activity. 

The printout lists all variables used 
in the program in alphabetical order 
and the line numbers in which they ap- 
pear. Following that is a listing in numeri- 
cal order of lines that branch to other 
lines and their destinations. Now you 
can consult this cross-reference list be- 
fore making changes or alterations to 
64 or 128 BASIC programs without wor- 
tying about deleting or overwriting im- 
portant variables or line numbers. 


CROSSREF 128 

PK 5 REM COPYRIGHT 1993 - COMP 
UTE PUBLICATIONS INTL LTD 
- ALL RIGHTS RESERVED 


Js 
SB 


MF 


BQ 


16 
26 


25 


36 


SEG.2 


MS 


PA 


XP 
KH 
CH 
CE 
QQ 
BD 
HK 
EH 
Gc 


AB 
DB 


MB 


DC 


1d 


26 
36 


46 
56 
66 
76 
86 
96 
160 
1196 
129 
136 
146 
156 
166 
176 
186 
196 
206 
216 
226 


2396 
246 


256 
269 


REM LABELS AND CONSTANTS 
AS= “FAST"+CHRS (13)+"0P2 
78,2, "+CHRS (34)+"G:W,S,W 
"+CHRS (34) +CHRS (13) +"CM2 
"+CHRS (13) +"LI"+CHRS (13 
+"PR2"+CHRS (13) +"CLOSE2" 
KEY1, AS$+CHRS (13) +"RUN"+C 
HRS (34) +"SEG. 2"+CHRS (34) 
+CHRS$ (13) 
COLORG,1:COLOR4,1:PRINT" 
{CLR}{4 DOWN} {YEL} 

{5 SPACES}LOAD THE PROGR 
AM TO BE PROCESSED":PRIN 
T"{1@ SPACES}THEN PRESS 
{SPACE}THE Fl KEY" 


REM COPYRIGHT 1993 - COM 
PUTE PUBLICATIONS INTL L 
TD - ALL RIGHTS RESERVED 
REM SEGMENT 2 
FAST:OPEN2,8,2,"@0:W,S,R 
"sDIMRSS$(15@) ,PUS(14) ,LB 
$ (788) ,LN% (788) ,2S$(26), 
NA (206) ,BA% (200) :B=1:Q= 
1:QTS=CHRS$ (34) :OPEN1,4 
FORI=1T015@:READRSS (I) :N 
EXT 
FORI=1T012:READPUS (I) :NE 
xT 
REM ***ROUTINE TO EXTRAC 
T A LINE 
GET#2,A$:SU=ST 
IFAS=CHRS (13) THENLGG 
BS=BS+A$:GOTO15@ 
IFLEFTS (BS$,5) ="READY"TH 
ENBS="":GOTO15G 
IFBS=""THEN15@ 
I=INSTR(LEFTS (BS$,9) ,"RE 
M") : IFI>@THENBS="":GOTO 
150 ; 
I=INSTR(LEFTS (BS,10) ,"D 
ATA") : IFI>@THENBS="":GO 
TO156 
GOSUB170:BS="" 
IFSU=G6THEN7@:ELSECLOSE2 
:GOTO6GS 
REM ***ROUTINE TO EXTRA 
CT AN INSTRUCTION 
CS="":I=INSTR(BS," ",1) 
:N=VAL (LEFTS$ (BS,I-1)) :P 
=I+1:ZP=1 
IFP>LEN (BS) THEN25@ 
IFMIDS (B$,P,1)=":"THEN2 
46 
IFMIDS (BS$,P,1)<>QTSTHEN 
226 
P=P+1:IFCS=OTHENCS=1:GO 
T0180 :ELSECS=0:GOTO180 
IFCS=GTHENCS$=CS+MID$ (BS 
7P,1) 
P=P+1:GOTO180 
CL=LEN (C$) :GOSUB279: P=P 
+1:CS="":GOTO189 
CL=LEN (C$) :GOSUB270:RET 
URN 
REM ***SUBROUTINE TO EX 


MAY 1993 COMPUTE G-35 


PROGRAMS 


GK 
G-36 


276 
286 
296 
366 
3195 
326 
336 
340 
350 


368 
376 
380 
396 
400 
416 
420 
436 


44G 
456 


460 
478 
486 
496 
560 


516 


520 


538 


540 
556 
568 


578 


580 
590 


686 


TRACT CONSTANTS 
L=l 
HT=6 
GOSUB526:IFL>GTHEN29G6:E 
LSEL=-L 
IFL=CL+1THEN47@ 
FORT=1T0O12:IFMIDS(CS,L, 
1) <>PUS$ (T) THENNEXT: GOTO 
336 
HT=1:L=L+1:1FL=CL+1 THEN 
476:ELSE310 
IFASC (MIDS (C$,L,1)) <>34 
THEN38@ 
HT=1:L=L+1 
FORT=LTOL+254:IFASC (MID 
$(C$,T,1))=34THENL=T+1: 
GOTO376 
NEXT:END 
IFL=CL+1THEN470 
IFMID$(CS$,L,1) <>CHRS (44 
) ANDMIDS (C$,L,1) <>CHRS ( 
32) THEN4O@ 
L=L+1:HT=1: IFL=CL+1THEN 
470:ELSE380 
IFASC (MID$(C$,L,1))>570 
RASC (MIDS (C$,L,1)) <48TH 
EN436 
IFSN=1THEN43@ 
HT=1:L=L+1: IFL=CL+1THEN 
47GELSE466 
IFHT=LANDSN=G@THEN 280 
IFHT=1LANDSN=1THEN466 
SN=1:ES=ES+MIDS$(CS$,L,1 
:L=L+1:IFL=CL+1THEN47@: 
ELSE280 
SN=8:GOSUB486:GOTO28G 
IFSN=1THENSN=@:GOSUB480 
: RETURN 
REM ***ROUTINE TO BLOCK 
DUPLICATE REFERENCES 
FORI=1TOZP: IFES$=ZS$(I)T 
HENES="": RETURN 
NEXT: LN% (B) =N: LBS (B) =E$ 
:ZP=ZP+1:ZS$ (ZP) =ES:B=B 
+1:E$="":RETURN 
REM ***SUBROUTINE TO ST 
RIP INSTR 
FORT=3ATOLS@STEP30:1FMI 
DS(CS$,L,LEN(RS$(T)))>RS 
$ (T) THENNEXT : GOTO580 
T=T-29:PORU=TTOT+29:IFM 
ID$(C$,L,LEN(RS$(U)))>R 
SS (U) THENNEXT : GOTO589 
IFMIDS (C$,L,LEN(RSS(U) ) 
) <RSS (U) THENS83 
IFRSS (U) ="REM"THENBS="" 
:GOTO15G 
IFRSS (U) ="THEN"ORRSS (U) 
="ELSE"ORRSS (U) ="GOTO"0 
RRSS (U) ="GOSUB"THENGOSU 
B768 
L=L+LEN (RS$(U)) :HT=1:RE 
TURN 
L=-L: RETURN 
REM ***ROUTINE TO PRINT 
OUTPUT 
PRINT#1,"VARIABLE CROSS 


COMPUTE MAY 1993 


PB 


AJ 


AM 


JF 


616 


626 
636 


646 
656 


660 
676 


680 


696 


768 


716 


726 


738 


748 
758 


766 


776 


786 


796 


REFERENCE LIST": PRINT# 
1,"LABELS MAY APPEAR MO 
RE THAN ONCE ON A LINE" 
3 PRINT#1 
AS="ZZZ2Z":FORI=1TOB-1:1 
FLBS (1) <ASTHENAS=LBS (1) 
NEXT: IFAS="ZZ2Z"THEN650 
PRINT#1,A$;SPC(6-LEN (AS 
));"-";:PORI=1TOB-1:I1FL 
BS (I) =ASTHENPRINT#1,LN% 
(I); 2:LB$ (1) ="22zz" 
NEXT: PRINT#1:GOTO610 
PRINT#1:PRINT#1,"ACCESS 
ED LINES AND WHERE THEY 
ARE REFERENCED": PRINT# 
1 
A%=32767:FORI=1T0Q-1:1F 
BAS (I) <ASTHENAS=BA$ (1) 
NEXT: IFA%=32767THENPRIN 
T#1:CLOSE1:SCRATCH"W":S 
LOW:END 
PRINT#1,A%;" - ";:FORI= 
1T0Q~-1: IFBA% (I) =A$THENP 
RINT#1,NA$% (I) 7 :BA$(I) =3 
2767 
NEXT: PRINT 4#1:GOTO66G 
L$=""";FORI=L+LEN (RSS (U) 
) TOCL:AS=MID$ (C$,1,1):1 
FASC (AS) <58ANDASC (A$) >4 
TTHENLS=LS+A$ : NEXT: GOTO 
736 
IFAS="_“"THENNEXT:GOTO73 
6 


IFAS=", "THENNA$ (Q) =N:BA 
$ (Q) =VAL (LS) :LS="":Q=Q+ 
1:NEXT:GOTO74G 
IFLS<>""THENNA$ (Q) =N:BA 
% (Q) =VAL (L$) :Q=Q+1 
RETURN 

DATA ABS,AND,APPEND,ASC 
,ATN, BACKUP, BANK, BEGIN, 
BEND ,BLOAD, BOOT ,BOX, BSA 
VE, BUMP, CATALOG, CHAR,CH 
RS$,CIRCLE,CLOSE,CLR,CMD 
,COLLECT., COLLISION ,COLO 
R,CONCAT ,COPY ,COS 

DATA DCLEAR,DCLOSE,DEC, 
DEF, DIM, DIRECTORY, DLOAD 
,DO,DOPEN, DRAW, DSAVE , DV 
ERIFY,ELSE,END, ENVELOPE 
,ERRS,EXIT,EXP,FAST,FET 
CH, FILTER, FN,FOR,FRE,GE 
T 


DATA GOSUB,GO64,GOTO,GR 
APHIC,GSHAPE, HEADER, HEX 
$,IF, INPUT, INSTR, INT,JO 
Y,KEY,LEFT$,LEN,LET,LIS 
T,LOAD,LOCATE,LOG,LOOP, 
MIDS ,MOVSPR, NEW, NEXT 
DATA ON,OPEN,OR,PAINT,P 
EEK, PEN, PI, PLAY, POKE, PO 
S,POT,PRINT,PUDEF,RCLR, 
RDOT , READ, RECORD, REM, RE 
NAME , RESTORE, RESUME, RET 
URN, RGR, RIGHTS, RND, RREG 
,RSPCOLOR 

DATA RSPPOS,RSPRITE;RUN 


»RWINDOW, SAVE, SCALE, SCN 
CLR, SCRATCH,SGN,SIN,SLE 
EP,SLOW, SOUND,SPC,SPRCO 
LOR,SPRDEF,SPRITE,SPRSA 
V,SQR,SSHAPE,STASH,STEP 
,STOP,STRS,SWAP 

DATA SYS,TAB,TAN,TEMPO, 
THEN,TO,TRAP,TROFF,TRON 
,UNTIL,USING,USR,VAL,VE 
RIFY,VOL,WAIT,WHILE,WID 
TH ,WINDOW, XOR,22222,#, ( 
Daten ri eSa re 


PM 860 


Donald Klich is the author of File Index 
128 (April 1993). He lives in Mount Pros- 
pect, Illinois. 


YOUR OWN DATABASE 


By Jim Butterfield 

You can sit down at your 64 or 128 and 
write your own customized database pro- 
gram. The program will be in BASIC, and 
although it will have a few limitations, it 
will work nicely. Here's how to go about 
it. A sample program is included that will 
run on either a 64 or 128. 


Types of Databases 

The simplest type of database is 
called a flat file system. You may think 
of it as a set of cards in a drawer, in no 
particular order. To find a given record, 
you'll have to search through the 
whole set. That's not too hard to do if 
your database is of modest size. Our 
program will use flat files. This means 
that any new items that we add go at 
the end. We may also delete or modify 
existing records. 

Indexed files are the next type of da- 
tabase and are a step up in complexi- 
ty. The records are put in some type of 
order, such as alphabetical order by 
name. Although it wouldn't be a great 
deal of work to change our simple pro- 
gram to an indexed type, we'll stick 
with the simple flat files. 

Relational databases are more com- 
plex because records are linked to 
each other. A school database might 
link students to classes to teachers to 
classrooms. These databases are too 
complex for us to tackle here. 


Limitations 

Some Commodore 8-bit machines 
have hard disks, but the most common 
setup is a single floppy disk drive. 
That configuration limits the size and 


style of databases that can be easily fit- 
ted into our system. 

Our project will stay with a database 
that can be read completely into the 
computer's RAM memory. The process 
consists of reading in the whole file, 
viewing or modifying the data, and writ- 
ing the whole file back to floppy disk. 

Commodore BASIC is limited by the 
INPUT statement (and the related IN- 
PUT# statement). If the data coming in 
contains a comma (,) or colon (:) char- 
acter, these statements will not be- 
have. Ornate coding can get around 
these problems. But to keep it simple, 
we'll forbid the use of these characters 
in our database. 


Typing It In 

Database is written entirely in BASIC. 
To help avoid typing errors, enter it 
with The Automatic Proofreader; see 
“Typing Aids” elsewhere in this sec- 
tion. Be sure to save a copy of the pro- 
gram before you exit Proofreader. 


The Program 

Database is a brief demo program to 
show you how to go about doing the 
job. You may want to modify it and ex- 
pand on its basic form. As it stands in 
this demo, the database keeps track of 
members of a small club: last name, 
first name, date (of birth or member- 
ship), and high score. 

In planning a database, it's impor- 
tant to list the fields: the data elements 
that go to make up a record. The sam- 
ple program has four fields, and I've de- 
liberately chosen three types: string (a 
name), date, and numeric value. A 
fourth type, dollars and cents, is also 
common, but isn’t included here. 

Decide on a maximum number of re- 
cords for your database. I've chosen 
50 records, but this can be easily 
changed by modifying the value of N9 
in line 110. 

The four fields are set up as arrays 
named AS( ), BS( ), CS( ), and D( ). 
The dollar symbols used with the first 
three indicate that these are strings. 
Field 3, C$( ), is the date, and it could 
be a number rather than a string. But 
since we don't do arithmetic on this 
field, it may be conveniently left as a 
string value. You may want to total or av- 
erage field 4, which is the high score, 
so we'll drop the dollar sign and make 


this field a numeric one. 


Program Modules 
In lines 100-350, the program does a 
little initialization and then reads in the 
data file. If the data file doesn’t exist, 
the program warns you of this but al- 
lows you to continue with an empty da- 
tabase. The program will create this 
file once you have entered some data. 
Lines 400-510 ask for some action. 
You have the following options: add, de- 
lete, change (a record), show (the 
file), or quit. Some actions are not avail- 
able if the database is empty or full. 


Quit 

Lines 520-760 handle the Quit option. 
If no changes have been made to the 
file or if the database contains no re- 
cords, the program quits immediately. 
Otherwise, the program creates an up- 
dated file called MYDATA and writes it 
to disk. This is done carefully so that a 
backup file will exist. The sequence 
scratches the previous backup file; re- 
names the former data file so that it be- 
comes the backup; and, finally, writes 
the new data file. 


Add 

Lines 1000-1160 let you add records 
to the database. Data for the new re- 
cord is requested. Then this record is 
displayed, allowing you to accept or 
cancel it. 


Delete 

Lines 2000-2210 contain the routine to 
delete records. You can select the re- 
cord for deletion. That record is 
shown in detail so that you can confirm 
or cancel the delete request. 


Change 

The routine to change a record is 
found in lines 3000-3190. You are al- 
lowed to select the record to be 
changed. The record is shown in de- 
tail, with the four fields numbered; you 
are asked to select which field to 
change. After any change, you may 
continue to make changes on the 
same record. 

It should be noted that a program 
can be set up to allow only certain 
changes. For example, the high score 
field might be available for modifica- 
tion, but the name fields, once entered, 


might be nonchangeable. 


Display 

Lines 4000-4290 display the records 
on the screen or send them to the print- 
er. The coding assumes a 40-column 
screen, so the data is squeezed to fit. 
The screen display pauses from time 
to time to allow the data to be read. 
Printer output, in contrast, takes advan- 
tage of the wider output area and 
prints all records without pause. 


Specify 

The DELETE and CHANGE commands 
call for a specific record to be select- 
ed. This is done in the subroutine be- 
tween lines 5000-5160. If you don't 
find the desired record, a no-record- 
selected value of 0 may be returned. 


Date 

Lines 8000-8120 handle the date rou- 
tine: You are prompted for a date in 
year/month/day order. This is 
changed to a numeric string within the 
database. Dates held in this way, 
19930214, for example, may be easily 
searched or sorted if necessary. Note 
that you may enter the month either as 
a name or as a number. 


Comments 

Database programs often contain extra 
features not shown here. For example, 
the program might search for selected 
data or produce totals or averages. 
Again, there are related programs (re- 
port generators) that sort and summa- 
rize data, but our simple program is 
kept to a minimum of steps. 

Watch for the limitations of the IN- 
PUT statement. We've mentioned the 
need to stay away from commas and 
colons. As you expand the features of 
your database, keep in mind a few oth- 
er factors. The computer won't like emp- 
ty fields. If you have fields such as mid- 
dle initial, apartment number, or date 
of marriage, be sure to have your pro- 
gram fill unused items with a dummy 
character such as a slash or asterisk. 

Some databases never delete or 
change a record. If you need a 
change, a correcting entry is added. 
That's a valid way to do things, but it 
may cause the data file to grow to an 
unreasonable size. You might find it use- 
ful to reform your data at intervals, say 


MAY 1993 COMPUTE G-37 


PROGRAMS 


at the start of each year. The old 
database may be kept as an ar- 
chive; the new one will contain only 
current information. 

The program Database is just a 
start. Plan your own data, and mod- 
ify the program to meet your own 
needs. 


DATABASE 

FC 5@ REM COPYRIGHT 1993 - COM 
PUTE PUBLICATIONS - ALL 
{SPACE}RIGHTS RESERVED 


AS 100 REM SIMPLE FLAT FILE DA 
TA BASE 

XE 110 N9=58 

QM 120 DIM A$(N9) ,BS(N9) ,CS(N9 
),D(N9) 

QH 130 SS$="{17 SPACES}" 

JE 146 M9$=",.JANFEBMARAPRMAYJ 
UNJULAUGSEPOCTNOVDEC" 

KH 200 OPEN 15,8,15 

PR 210 OPEN 1,8,3,"@:MYDATA,S, 
R" 

AD 226 INPUT#15,E,E$ 

PF 238 IF E=6 GOTO 300 

QM 240 CLOSE 1:CLOSE 15 

DA 250 PRINT "I CANNOT FIND FI 
LE 'MYDATA'" 

DS 266 INPUT "CONTINUE";XS 

SR 270 IF X$="Y" OR XS="YES" G 
OTO 406 

MH 286 END 

JE 300 N=N+1 

DQ 310 INPUT#1,A$(N) ,BS(N) ,C$( 
N) ,D(N) 

EF 320 IF ST=0 GOTO 300 

FX 330 CLOSE 1:CLOSE 15 

SJ 34@ PRINT N;"RECORDS FOUND 
{SPACE}ON FILE." 

EQ 350 IF N+1G>N9 THEN PRINT " 
FILE ALMOST FULL!" 

GB 460 IF N>G THEN PRINT "SHOW 

" 

Pee 

RJ 416 IF N<N9 THEN PRINT "ADD 

" 

ee 

BP 420 IF N>@ THEN PRINT "DELF 
TE, CHANGE, "; 

QG 430 PRINT "QUIT 

JS 440 INPUT X$:XS=LEFTS(XS,1 

HX 450 IF N=@ GOTO 496 

GG 460 GOTO 4000 

DP 476 GOTO 2000 

RK 48@ IF X$="C" GOTO 3669 

BF 490 IF N=N9 GOTO 516 

QM 560 IF XS="A" GOTO 1606 

MH 510 IF X$<>"Q" GoTO 466 

QS 526 REM QUIT .. BUT PERHAPS 
WRITE FILE 

XJ 536 IF F9=G6 OR N=6 THEN END 

FP 546 PRINT "READY TO WRITE F 
ILE!" 

HX 550 PRINT "PRESS ANY KEY." 

EE 560 GET X$,X$,X$ 

EJ 576 GET X$:IF x$="" GOTO 57 
@ 3 

G-38 COMPUTE MAY 1993 


HG 


Pc 


58 


596 
608 


610 
628 
636 
646 


656 
666 


678 
686 
696 
768 
716 
726 
736 
746 
758 
766 
1668 
1616 


1626 
1636 
1648 
1656 
1668 
1676 
1686 
1696 
1166 
1116 
1126 


1136 


1146 
1156 


1166 
2666 
2616 
2626 


26368 


2646 


2656 


2068 
2065 


2076 


2088 


REM DELETE ARCHIVE IF P 
RESENT 

OPEN 15,8,15 
PRINT#15,"S@:MYDATA.OLD 
" 


REM RENAME PREVIOUS DAT 
A FILE 
PRINT#15,"RO:MYDATA.OLD 
=@:MYDATA" 
REM WRITE NEW MASTER FI 
LE 
OPEN 1,8,3,"G:MYDATA,S, 
w" 
INPUT#15,E,E$ 
IF E<>@ THEN PRINT E;E$ 
:CLOSE 1:CLOSE 15:END 
FOR J=1 TO N 
PRINT#1,A$ (J) 
PRINT#1,B$ (J) 
PRINT#1,C$ (J) 
PRINT#1,D(J) 
NEXT J 
INPUT#15,E,E$,E1,E2 
IF E<>@ THEN PRINT E;ES$ 
CLOSE 1:CLOSE 15 
END 
REM ADD A RECORD 
INPUT "LAST NAME";A$(N 
+1) 
INPUT "FIRST NAME";BS( 
N+1) 
V=N+1:GOSUB 8008 : 
GET DATE 
INPUT "HIGH SCORE";D(N 
+1) 
PRINT 
PRINT 
PRINT 
PRINT 
PRINT 
INPUT 
"EX$ 
IF X$="Y" OR X$="YES" 
{SPACE}GOTO 1149 
PRINT ">>> RECORD CANC 
ELLED! <<<" 
GOTO 466 
N=N+1:F9=1 
PRINT N;"RECORDS TOTAL 
" 


REM 


AS (N+1) 
BS (N+1) 
C$ (N+1) 
D(N+1) 
"IS THE ABOVE OK 


GOTO 406 

REM DELETE A RECORD 

GOSUB 5000 

IF X=@ GOTO 460 

PRINT "READY TO DELETE 
RECORD:" 

PRINT "{2 SPACES}";AS$( 

X) 

PRINT "{2 SPACES}";BS( 

x) 

M=VAL (MIDS (C$(X) ,5,2)) 

PRINT "{2 SPACES}";LEF 

TS(C$(X) ,4) ;MIDS (MOS »M 

*3,3) ;RIGHTS (C$ (X) ,2) 

PRINT "{2 SPACES}";D(X 


) 
INPUT "OK TO DELETE";X 


DE 
EP 


2698 
2189 


21190 
2129 
2139 
2146 
2158 
2166 
2178 
2186 
2196 
2286 
2218 


2226 
3600 
36196 
3020 
3036 


3046 
3656 


3066 
3065 


3670 
3680 
30696 
3196 


3116 
3126 


3136 
3148 


3158 
3166 


3176 
3186 


3190 
4096 


46196 
4926 
4630 
4046 
4050 
4968 
4076 
4086 


4696 
4196 


$ 

IF X$="Y" OR X$="YES" 
{SPACE}GOTO 2120 
PRINT "RECORD >>>NOT<< 
< DELETED!" 

GOTO 496 

N=N-1 i 

IF X>N GOTO 2220 

FOR J=X TO N 

AS (J) =A$ (J+1) 

BS (J) =B$ (J+1) 

C$ (J) =C$(J+1) 

D(J) =D(J+1) 

NEXT J 

F9=1 

PRINT ">>> RECORD DELE 
TED! <<<" 

GOTO 406 

REM CHANGE A RECORD 
GOSUB 5008 

IF X=@ GOTO 400 


PRINT "READY TO CHANGE 
RECORD:" 
PRINT "1:";AS$(X) 


PRINT "2:";B$(X) 

M=VAL (MID$ (C$(X) ,5,2)) 
PRINT "3:";LEFTS (CS (X) 
4) ;MID$ (M9$,M*3,3) ;RI 
GHTS (C$ (X) ,2) 

PRINT "4:";D(X) 

INPUT "CHANGE WHICH FI 
ELD (G=NONE)";J 
J=INT(J):IF J<1 OR J>4 
THEN J=G 

ON J GOTO 3126,3146,31 
60,3186 

GOTO 496 

INPUT "LAST NAME";AS (X 


) 

F9=1:GOTO 3046 

INPUT “FIRST NAME";BS ( 
x) 

F9=1:GOTO 3446 
V=X:GOSUB 8406 : 
ET DATE 
F9=1:GOTO 3046 
INPUT "HIGH SCORE";D(X 


REM G 


) 

F9=1:GOTO 3049 

REM SHOW ~ DISPLAY OR 
{SPACE} PRINT 

INPUT "SCREEN OR PRINT 
ER";X$ 

X$=LEFTS (X$,1) 

IF X$="P" GOTO 4194 

IF X$<>"S" GOTO 4014 
J=1 

K=J+20:IF K=N THEN K=N 
+1 

PRINT LEFTS$(A$(J)+S$,1 
3); 

PRINT LEFTS$(B$(J)+S$,1 
6); 5 

M=VAL (MIDS (C$(J) ,5,2)) 
PRINT LEFTS$(CS$(J),4) 3M 
IDS (M9$ ,M*3,3) ; RIGHTS ( 
C$(J),2); 


4116 
4126 
4136 


4149 
4156 


4166 
4176 
4186 
4196 
4206 
4216 
4226 


4238 
4248 
4256 
4266 
4276 
4280 
4296 
5600 
5619 
5026 
563¢ 
5640 
50595 
5668 
5676 


5080 
5696 


5196 
5116 


5126 
5138 


5140 
5156 


5169 
8009 
8610 


8026 
8030 


8040 
8056 
8060 


PRINT RIGHTS (SS$+STRS(D 
(J))-7) 

J=J+1:1IF J<>K GOTO 417 
(i 

PRINT "{2 SPACES}>> MO 
RE - PRESS ANY KEY <<" 
7CHRS (145) 

GET X$,X$,X$,X$ 

GET X$:IF X$="" GoTo 4 
156 

GOTO 4666 

IF J<=N GOTO 4070 

GOTO 409 

REM SEND TO PRINTER 
OPEN 4,4 

FOR J=1 TO N 
PRINT#4,LEFTS$(AS$(J)+SS 
128); 

PRINT#4,LEFTS$ (BS(J)+S$ 
115); 

M=VAL (MIDS (C$(J) ,5,2)) 
PRINT#4,LEFTS (C$ (J) ,4) 
;MIDS$ (M9$,M*3,3) ;RIGHT 
$(CS$(J),2)3 

PRINT#4, RIGHTS (S$+STRS 
(D(J)) ,10) 

NEXT J 

CLOSE 4 

GOTO 400 

PRINT "SELECT WHICH RE 
CORD:" 

Jsl 

K=J+26:IF K>N THEN K=N 
FOR S=J TO K 

PRINT RIGHTS (S$+STRS(S 
),3)7"3 ";LEFTS (AS (S)+ 
$$,12); 

PRINT LEFTS(BS$(S)+SS,6 
3 

PRINT LEFT$(C$(S)+S$,8 
3 

PRINT RIGHTS (SS$+STR$(D 
(S)),7) 

NEXT S 

PRINT ">> SELECT RECOR 
D NUMBER, OR @ "; 


IF K<>N THEN PRINT "FO 
R MORE <<" 
IF K=N THEN PRINT "TO 


{SPACE}QUIT <<" 

INPUT X 

X=INT(X):IF X>N THEN X 
=0 

J=K 

IF X=9 AND K<>N GOTO 5 
620 

RETURN 

INPUT "YEAR";Y¥ 

IF ¥<1908 OR Y¥>9999 GO 
TO 8000 

INPUT "MONTH" ;MS 

M=VAL (M$) :IF M>G AND M 
<13 GOTO 8653 

MS=LEFTS (M$+S$,3) 

FOR J=1 TO 12 

IF M$=MIDS$ (M9$,J*3,3) 
{SPACE}THEN M=J 


FG 80678 NEXT J 

QQ 8684 IF M<l OR M>12 GOTO 8G 
26 

SE 8696 INPUT "DAY";D 

MQ 8108 IF D<l OR D>31 GOTO 8@ 
96 

RK 8119 C$(V)=RIGHTS(STRS$(Y) ,4 


) +RIGHTS (STRS (M+10GS ,2 
) +RIGHTS (STR$(D+108) ,2 


) 
RS 8128 RETURN 


Jim Butterfield writes ‘Machine Lan- 
guage," a regular Gazette column. He 
lives in Toronto, Ontario, Canada. 


ML MACROS 


By Cameron Kaiser 

On the side of my computer | have 
taped a list of SYS codes: SYS 62913; 
SYS 49152,X,Y,Z; SYS 64738; SYS 
57812'filename",D,S; and so on. The on- 
ly way | can keep them straight is to use 
them or write them down; otherwise, I'll for- 
get them, 

Unfortunately, | still have problems 
keeping all those SYS codes straight. 
This is where ML Macros comes in. All 
you have to do is remember one SYS 
code, and with a simple symbol that you 
define, you can call up an infinite number 
of ML programs easily and quickly. And 
ML Macros can prove a boon to program- 
mers by providing an easily customized 
and handy interface to their programs. 


Entering the Program 

ML Macros is written in machine lan- 
guage. To enter it, you'll need MLX, 
our machine language entry program; 
see “Typing Aids” elsewhere in this is- 
sue. When the program prompts for 
starting and ending addresses, enter 
the following. 


Starting address: CE0O 
Ending address: CFE7 


Be sure to save a copy of the program 
before exiting MLX. 


Running the Program 

To install ML Macros, simply load the 
program with the ,8,1 extension. After 
it loads, type SYS 53052, press Return, 
and then type NEWto clear pointers. If 
you want to.load and run ML Macros 
from within a BASIC program, add 
these lines to your program. 


0 IFA=0 THEN A=1:LOAD “ML MACROS”,8,1 
1 IFA=1 THEN SYS 53052 


Of course, you can use whatever line 
numbers are convenient for you. 


Using the Program 

To converse with ML Macros, you'll 
use commands that all begin with the 
# symbol. In ML Macros the first com- 
mand defines a macro. To use it, type 
#,2, ASC(‘‘character"’), address. Char- 
acter is any symbol not reserved by 
the computer. Most punctuation marks 
are acceptable. Adaress is the starting 
address of the machine language sub- 
routine that will be triggered when you 
enter the character. For example, 
#,2,ASC(&"),64738 will program the 
ampersand to reset the computer if it is 
entered as a command. 

The second command lets you 
save a set of macros to disk. To use it, 
type #,3, “filename”, dev,1, where file- 
name is any legal filename and dev is 
the device number of your drive, usu- 
ally 8. This command also saves the 
ML Macros code to disk with the mac- 
ros so that one LOAD command will 
give you easy access to macros and 
ML code on all your disks. 

The final command reloads a set of 
macros from disk. To use it, type 
#,4, "filename", dev,1. Filename and 
dev are used the same as they are in 
the SAVE command. 

ML Macros isn't fussy about its in- 
put. It's possible to define two macros 
to the same character; however, only 
the first macro defined will be honored. 
This means you cannot erase a macro 
by defining its character to another ML 
routine. Should you wish to wipe the 
macro memory, type POKE 52992, 3. 
Should you wish to erase only the last 
macro defined, type POKE 52992, 
PEEK(52992)-3. 

While ML Macros was designed 
with compatibility in mind—it doesn't 
modify IRQ, NMI, or Kernal vectors and 
occupies a rarely used portion of mem- 
ory—any modifications to locations 
52736-53223 ($CEOO-$CFE7) wil 
cause erratic behavior when ML Mac- 
ros or any macro defined under it is in- 
voked. This doesn't apply to BASIC, 
but it does apply to some ML routines. 
Good luck with your ML programs, and 
| hope ML Macros makes them easier. 

MAY 1993 COMPUTE  G-39 


PROGRAMS/THE AUTOMATIC PROOFREADER 


SL EE TE a a a Ee Ye 


ML MACROS 


CEGG:23 GC CF G6 BG BB GB BB 2C 
CE@8:06 68 GG BB GB BB BG GB AS 
CE16:66 G9 GG GB BB GB GB GG AD 
CE18:66 66 GG GG BB GB BB BG BS 
CE26:69 GG GG GB BG BB BG GG BD 
CE28:66 GG 6B BG BG BB GB BG C5 
CE36:60 63 GG GB BB GB BB BG CD 
CE38:06 G8 GG 
CE46:68 GB GB GB 4B GB BB BG DD 
CE48:68 G6 GG GB BB BB GG GG ES 
CE56:66 GB GB GG BB BB GB BG ED 
CE58:68 GG GB GB BG GB BB BB FS 
CE66:66 G8 GG BB GB BG BB BB FD 
CE68:68 GB GG 
CE70:60 G6 6G BB BB BB GB BG BE 
CE78:00 GG GG OB BG BB GB GB 16 
CE80:00 G6 6G GB BG BG GB BB IE 
CE88:60 G9 GG BB BG BG GB BB 26 
CE96:66 GG GG GB GG BG BG GB 2E 
CE98:00 GG GG GB GG BG BG GB 36 
CEAG:06 GG GG GB GB BG BO GB 3E 
CEA8:60 G6 GG GG GB BB GG GO 46 
CEBG:90 G6 BG GB BG GB GB BO 4E 
CEB8:00 6G 3G GG BB BB GB BB 56 
CECG:68 GB GS GB BO GB GB BO SE 
CEC8:00 G6 GG GB BG BG BG BB 66 
CEDG:00 G6 GH GB BB BG GG GO 6E 
CED8:48 GB GB GG BG BG BG BB 76 
CEEG:80 GO GG BB AG BB BB BG 7E 
CEE8:60 GG 60 BG BG GB GB BG 86 
CEFG:60 GG GG GB BG GB BB BO BE 
CEF8:60 6G 4C DB CF 4C 98 CF 8E 
CFG6:63 6G GG 26 FD AE 26 9E AC 
CFG8:AD 4C G1 B8 26 03 CF CO AA 
CF16:61 F@ GF C# G2 FO E6 CO BC 
CF18:63 FO DF C@ 64 FO 15 4C D7 
CF2G:E7 A7 4C AE A7 DG G8 AY 4C 
CF28:01 8D @1 CF 4C AE A7 A9 DE 
CF36:00 4C 29 CF 20 73 66 4C 20 
CF38:8F CF 6@ @D A9 47 A@ CF EB 
CF40:8D G8 G3 8C G9 G3 68 206 67 
CF48:73 6@ A2 80 DD G6 CE FG 73 
CF50:2C E8 E8 E8 EC G6 
CF58:F3 20 79 GB 4C E7 A7 8E 69 
CF60:62 CF 28 73 @G 206 6B CF 57 
CF68:4C E7 A7 AE @2 CF E8 BD E6 
CF76:60 CE E8 BC @% CE 85 FE Fl 
CF78:84 FF 6C FE @@ AD @1 CF 60 
CF80:FG DD 26 73 G8 FO D8 DD 9E 
CF88:00 CE F@ D3 4C 82 CF 20 63 
CF96:D4 El 20 A7 F4 4C AE A7 6F 
CF98:20 03 CF 98 AE OO CF 9D 3F 
CFAG:60 CE EE 68 CF 206 FD AE 7B 
CFA8:2@ 9E AD 26 F7 B7 A5 14 BS 
CFBG:AE 6G CF 9D 8G CE EE 66 94 
CFB8:CF A5 15 9D @1 CE EE 60 47 
CFC@:CF 4C AE A7 20 D4 El AY 6D 
CFC8:60 85 FD A9 CE 85 FE A9 58 
CFD@:FD A2 E8 AG CF 26 D8 FF EF 
CFD8:4C AE A7 26 73 66 4C C4 3A 
CFEG:CF 66 GB GB BG BB GB BG 68 


Cameron Kaiser is a senior at Luther- 
an High in San Diego. His interests in- 
clude Pink Floyd, basketball, rock mu- 
sic, and his nine-year-old Commodore. 
He lives in La Mesa, California. qa 


G-40 COMPUTE MAY 1993 


The Automatic Proofreader helps you 
type in program listings for the 128 and 
64 and prevents nearly every kind of 
typing mistake. 

Type in Proofreader exactly as list- 
ed. Because the program can’t check 
itself, be sure to enter each line care- 
fully to avoid typographical errors or oth- 
er mistakes. Don't omit any lines, even 
if they contain unusual commands. Af- 
ter you've finished, save a copy of the 
program before running it. 

Next, type RUN and press Return. Af- 
ter the program displays the message 
Proofreader Active, you're ready to 
type in a BASIC program. 

Every time you finish typing a line 
and press Return, Proofreader displays 
a two-letter checksum in the upper left 
corner of the screen. Compare this re- 
sult with the two-letter checksum print- 
ed to the left of the line in the program 
listing. If the letters match, the line prob- 
ably was typed correctly. If not, check 
for your mistake and correct the line. Al- 
so, be sure not to skip any lines. 

Proofreader ignores spaces not en- 
closed in quotation marks, so you can 
omit or add spaces between keywords 
and still see a matching checksum. 
Spaces inside quotes are almost al- 
ways significant, so the program pays 
attention to them. 

Proofreader does not accept key- 
word abbreviations (for example, ? in- 
stead of PRINT). If you use abbrevi- 
ations, you can still check the line by 
listing it, moving the cursor back to the 
line, and pressing Return. 

lf you're using Proofreader on the 
128, do not perform any GRAPHIC com- 
mands while Proofreader is active. 
When you perform a command like 
GRAPHIC 1, the computer moves eve- 
rything at the start of BASIC program 
space—including the Proofreader—to 
another memory area, causing Proof- 
reader to crash, The same thing hap- 
pens if you run any program with a 
GRAPHIC command while Proofreader 
is in memory. 

Though Proofreader doesn't interfere 
with other BASIC operations, it's a 
good idea to disable it before running 
another program. To disable it, turn the 
computer off and then on. A gentler 
method is to SYS to the computer's 
built-in reset routine (65341 for the 128, 
64738 for the 64). 


AUTOMATIC PROOFREADER 


@ CLR 

1@ VE=PEEK(772)+256*PEEK (773): 
LO=43:HI=44: PRINT" {CLR} 
{WHT}AUTOMATIC PROOFREADER 
{SPACE}FOR "; 

26 IF VE=42364 THEN PRINT "64" 

3@ IF VE=17165 THEN LO=45:HI=4 
6:WAIT CLR:PRINT"128" 

40 SA=(PEEK(LO)+256*PEEK(HI))+ 
6:FOR J=SA TO SA+166:READ B 
:POKE J,B:CH=CH+B:NEXT 

5@ IF CH<>20570 THEN PRINT "*E 
RROR* CHECK TYPING IN DATA 
{SPACE} STATEMENTS": END 

66 FOR J=1 TO 5:READ RF,LF,HF: 
RS=SA+RF:HB=INT (RS/256) :LB= 
RS~ (256*HB) 

76 CH=CH+RF+LF+HF:POKE SA+LF,L 
B:POKE SA+HF,HB:NEXT 

86 IF CH<>22654 THEN PRINT "*E 
RROR* RELOAD PROGRAM AND CH 
ECK FINAL LINE":END 

96 IF VE=17165 THEN POKE SA+14 
,22:POKE SA+18,23:POKESA+29 
7224: POKESA+139, 224 

100 POKE SA+149,PEEK(772) :POKE 

SA+15@, PEEK (773) :PRINT" 

{CLR}PROOFREADER ACTIVE" 

SYS SA:POKE HI,PEEK(HI) +1: 

POKE (PEEK(LO)+256*PEEK (HI 

))-1,0:NEW 

DATA126,169,73,141,4,3,169 

137141,5,3,88,96,165, 20,13 

3,167 

DATA165,21,133,168,169,0,1 

41,9,255,162,31,181,199,15 

7,227 

DATA3,202,16,248,169,19,32 

7216,255,169,18,32,210,255 

7166 

DATAG,132,180,132,176,136, 

236,180,206,185,0,2,240,46 

1201 

DATA34,268,8,72,165,176,73 

7255,133,176,104,72,201, 32 

1208 

DATA7,165,176,208,3,104,26 

BAG, AMA GB ch AM: Ade ag) 

7 

DATA121,6,2,133,167,165,16 

8,165,6,133,168,262,268,23 

9,246 

DATA202,165,167,69,168,72, 

41,15,168,185,211,3,32,219 

7255 

DATA104,74,74,74,74,168,18 

5211 as2n2lay eon ;e2r3L, 

189 

DATA227,3,149,199,202,16,2 

48,169,146,32,210,255,76,8 

6,137 

DATA65,66,67,68,69,79,71,7 

2,74,75,77,80,81,82,83,88 

DATA 13,2,7,167,31,32,151, 

116,117,151,128,129,167,13 

6,137 


116 


126 


136 


146 


156 


166 


176 


186 


199 


206 


216 


226 


236